Project

General

Profile

Actions

Bug #127

closed

Empty config entries returned as array

Added by Chris Buechler over 16 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/02/2009
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Chris Buechler over 16 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

Actions #2

Updated by Chris Buechler over 16 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

Actions #3

Updated by Scott Ullrich over 16 years ago

  • Target version changed from 2.0 to 3
Actions #4

Updated by Chris Buechler about 16 years ago

  • Target version changed from 3 to Future
  • Affected Version deleted (2.0)
Actions #5

Updated by Ermal Luçi about 16 years ago

  • Status changed from New to Feedback

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

Actions #6

Updated by Chris Buechler over 10 years ago

  • Status changed from Feedback to Resolved
  • Target version deleted (Future)
Actions

Also available in: Atom PDF