Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

[2008-07-25 09:01 UTC] robin_fernandes at uk dot ibm dot com

The bug is due to an erroneous return 0 in spl_array_has_property:
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0) {
if (!std_object_handlers.has_property(object, member, 2 TSRMLS_CC)) {
return spl_array_has_dimension(object, member, has_set_exists TSRMLS_CC);
}
return 0; /* if prop doesn't exist at all mode 0/1 cannot return 1 */
}
The comment states we return 0 when "prop doesn't exist at all", but the previous condition is such that this branch will be taken specifically if the property DOES exist.
Here's a simple patch against 5_3: http://pastebin.ca/1082412

This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fxied, thanks :)