Bug #127

Empty config entries returned as array

Added by Chris Buechler over 3 years ago. Updated about 3 years ago.

Status:Feedback Start date:11/02/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:Future
Affected version: Affected Architecture:

Description

I've seen this pop up in many text boxes of the web interface, for instance by browsing to Interfaces -> WAN, with this config:

<wan>
<if>vr0</if>
<mtu>
</mtu>
<ipaddr>dhcp</ipaddr>
<subnet>
</subnet>
<gateway>
</gateway>
<blockbogons/>
<dhcphostname>
</dhcphostname>
<media>
</media>
<mediaopt>
</mediaopt>
<bandwidth>100</bandwidth>
<bandwidthtype>Mb</bandwidthtype>
</wan>

MTU box shows:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /usr/local/www/interfaces.php on line 820

Hostname box shows:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /usr/local/www/interfaces.php on line 948

It also shows up in many other places.

History

#1 Updated by Chris Buechler over 3 years ago

Here's another instance of something being returned as "Array" when it shouldn't be.

php: : There were error(s) loading the rules: /tmp/rules.debug:43: unknown port Array pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [43]: nat on $WAN from 192.168.1.0/24 to any -> 2.3.1.4/32 port Array static-port

#2 Updated by Chris Buechler over 3 years ago

This is wrecking all kinds of things in 2.0, so the new xmlreader has been reverted for the time being.

If you would like to use the newer xmlreader.inc code simply touch
/cf/conf/use_xmlreader and the newer code will be used.

https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/093bcebcd38818d7f72f09e622f3412ddecc3c97

#3 Updated by Scott Ullrich over 3 years ago

  • Target version changed from 2.0 to 3

#4 Updated by Chris Buechler about 3 years ago

  • Target version changed from 3 to Future
  • Affected version deleted (2.0)

#5 Updated by Ermal Luçi about 3 years ago

  • Status changed from New to Feedback

Latest snapshot should be ok with this.
To test just 'touch /cf/conf/use_xmlreader'

Also available in: Atom PDF