Project

General

Profile

Bug #8967

PHP error in DNS Forwarder when config has no dnsmasq settings

Added by Jim Pingle over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DNS Forwarder
Target version:
Start date:
09/27/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.4.4
Affected Architecture:
All

Description

https://www.reddit.com/r/PFSENSE/comments/9je1ar/244_php_error/

Fatal error: Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/services_dnsmasq.php:96 Stack trace: #0 {main} thrown in /usr/local/www/services_dnsmasq.php on line 96 PHP ERROR: Type: 1, File: /usr/local/www/services_dnsmasq.php, Line: 96, Message: Uncaught Error: Cannot create references to/from string offsets in /usr/local/www/services_dnsmasq.php:96 Stack trace: #0 {main} thrown 

Code on that line assigns by reference, needs initialized first.

To me, I have a fix.

Associated revisions

Revision 651b4dcb (diff)
Added by Jim Pingle over 2 years ago

Init dnsmasq arrays before referencing. Fixes #8967

Revision 01cb6a79 (diff)
Added by Jim Pingle over 2 years ago

Init dnsmasq arrays before referencing. Fixes #8967

(cherry picked from commit 651b4dcb4ed2dc1404cd532a2a53190e77cbcbc4)

History

#1 Updated by Jim Pingle over 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#2 Updated by Jim Pingle over 2 years ago

#3 Updated by Steve Wheeler over 2 years ago

  • Status changed from Feedback to Resolved

Unable to replicate this in either 2.4.4 or in:

2.4.5-DEVELOPMENT (amd64)
built on Mon Oct 01 01:24:24 EDT 2018
FreeBSD 11.2-RELEASE-p4

Removed <dnsmasq> tags from the config. Rebooted to be sure. Opened services_dnsmasq.php. Enabled the forwarder. Added host overrides.

#4 Updated by Steve Beaver over 2 years ago

  • Target version changed from 2.4.4-GS to 2.4.4-p1

#5 Updated by Steve Beaver over 2 years ago

  • Target version changed from 2.4.4-p1 to 2.4.4-GS

Also available in: Atom PDF