
Shawn Pritchard - 2007-07-06 19:12:45
We just upgraded from PHP 5.1.6 and spent about 12 hours trying to find the cause of this error.
I happened to find an answer on google which stated:
**************************
Basically, his problem was using the "non-strict" evaluation for checking if two objects were equal to each other (== instead of ===). This compares everything about them, down to the properties - even if they're references to other properties inside of the same class (which is where the problem lies).
So, the fix is simple - === instead of == when comparing those objects. You'll be happier for the change.
**************************
So on line 62 of class.xml2array.php I changed this:
if ($child->node_name() == $testnode->node_name() && $child != $testnode)
to THIS:
if ($child->node_name() === $testnode->node_name() && $child !== $testnode)
Now all is well again!
I hope this helps somebody out! :-)