Fix for 4.0 branch.
class Node {
public function hasSiblings() {
....
foreach ($this->parent->children as $child) {
if ($child !== $this
&& ($child->type == Node::OBJECT || $child->hasChildren(false))
....
The use of !== rather than != prevents a recursion too deep in early versions of PHP5.2. This fatal error occours at least in PHP 5.2.0-8+etch16
I appreciate this is an old version of PHP however there is little reason not to make this fix within 4.0.10.7 as it's aim is to support 5.2.
!== also matches the type of the two variables being compared. That might have been one of the reasons for using !== instead of simply !=.
I am not too familiar with the codebase yet but it does seem as if the types of the two variables should always match. If that is the case, I would like to volunteer for making this (trivial :P) change :)
sudshekhar,
thanks but Ian P. Christian should be credited with this patch; no need to submit a pull request.
Thanks Ian. Are you the author of this patch? Do you agree with our DCO? (see https://github.com/phpmyadmin/phpmyadmin/blob/master/DCO)
I am and I do!
Thanks a lot Marc
Fix: https://github.com/phpmyadmin/phpmyadmin/commit/9b7fbe29ce6ed544f2f7d6203b26fb6cec3f7f40