You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error on PHP 5.2.0-8+etch16 on Apache on Debian Etch:
Fatal error: Call to a member function attributes() on a non-object in
/var/www/vhosts/user.name/httpdocs/esapi-php/src/reference/DefaultSecurityConfig
uration.php
on line 166
The code that causes this is:
{{{
$_events = $this->_xml->xpath('/esapi-properties/IntrusionDetector/event');
foreach ($_events as $event) {
$name = (string) $event[0]->attributes()->name;
$count = (int) $event[0]->attributes()->count;
$interval = (int) $event[0]->attributes()->interval;
}}}
`$_events` is an array of `SimpleXMLElement` and the error happens when we do:
`SimpleXMLElement[0]->attributes()`
This works:
`SimpleXMLElement->attributes()`
I've tested this on PHP 5.2.0-8+etch16 and PHP 5.2.9 on windows and propose
the attached patch as a fix.
It's worth noting that PHP 5.2.0-8+etch16 is the latest stable package of
PHP 5 for Debian Etch http://packages.debian.org/etch/php5 and seems to be
a popular platform for web hosting companies.
Original issue reported on code.google.com by jahboite@gmail.com on 14 Apr 2010 at 8:07
Original issue reported on code.google.com by
jahboite@gmail.com
on 14 Apr 2010 at 8:07Attachments:
The text was updated successfully, but these errors were encountered: