Project

General

Profile

Actions

Regression #12396

closed
JV CM

PHP Warning: Use of undefined constant ip - /etc/inc/services.inc on line 2465

Regression #12396: PHP Warning: Use of undefined constant ip - /etc/inc/services.inc on line 2465

Added by JP Versteeg almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
PHP Interpreter
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Force Exclusion
Affected Version:
Affected Architecture:

Description

Hi Team,
Could you please confirm. Many thanks.

Issue identified following the first reboot, after fully completing installation of 21.09RC upgrading from 21.02.

Error produced in GUI
PHP Warning:
Use of undefined constant ip - assumed 'ip' (this will throw an Error in a future version of PHP) in /etc/inc/services.inc on line 2465

A comparison of the local file with github showed the same line in both.
line 2465 /etc/inc/services.inc
line 2465 https://github.com/pfsense/pfsense/blob/master/src/etc/inc/services.inc

  1. Proposed change
  1. /etc/inc/services.inc line 2461-2469

/* Setup forwarded domains */
if (isset($config['dnsmasq']['domainoverrides']) && is_array($config['dnsmasq']['domainoverrides'])) {
foreach ($config['dnsmasq']['domainoverrides'] as $override) {
if ($override['ip'] == "!") {
- $override[ip] = "";
+ $override['ip'] = "";
}
$args .= ' --server=/' . $override['domain'] . '/' . $override['ip'];
}
}

JP Updated by Jim Pingle almost 5 years ago Actions #1

  • Status changed from New to Pull Request Review
  • Assignee set to Christian McDonald
  • Target version set to CE-Next
  • Plus Target Version set to 22.01

Odd that it would just start giving an error now since that line, as obviously wrong as it is, hasn't changed in 7 years. It's in code for the DNS Forwarder, which isn't used by default.

Most likely the latest version of PHP in use now is being more strict about such things.

CM Updated by Christian McDonald almost 5 years ago Actions #2

  • Status changed from Pull Request Review to Feedback

CM Updated by Christian McDonald almost 5 years ago Actions #3

Jim Pingle wrote in #note-1:

Most likely the latest version of PHP in use now is being more strict about such things.

I suspect the same.

JV Updated by JP Versteeg almost 5 years ago Actions #4

Many thanks. Do you want me to close this?

JP Updated by Jim Pingle almost 5 years ago Actions #5

  • Target version changed from CE-Next to 2.6.0

JP Updated by Jim Pingle almost 5 years ago Actions #6

  • Tracker changed from Bug to Regression
  • Release Notes changed from Default to Force Exclusion

Since this was only a regression in snapshots, no need to include it in release notes.

JP Updated by Jim Pingle over 4 years ago Actions #7

  • Status changed from Feedback to Resolved

Correct code is present in the repo.

Actions

Also available in: Atom