#40442 [Opn->Asn]: ArrayObject::offsetExists does not return a valid result

From: Date: Mon, 12 Feb 2007 09:15:41 +0000
Subject: #40442 [Opn->Asn]: ArrayObject::offsetExists does not return a valid result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108710@lists.php.net to get a copy of this message
ID: 40442 Updated by: tony2001@php.net Reported By: olivier at elma dot fr -Status: Open +Status: Assigned Bug Type: SPL related Operating System: Debian Unstable (not relevant) PHP Version: 5.2.1 -Assigned To: +Assigned To: helly Previous Comments: ------------------------------------------------------------------------ [2007-02-12 09:10:23] olivier at elma dot fr Description: ------------ With 5.2.0 ArrayObject::offsetExists will return "true" if the offsetExists whether its value is empty or not. This feature is not working anymore with 5.2.1 as it checks for the emptyness of the value too. Reproduce code: --------------- <?php $a = new ArrayObject(); $a->offsetSet('property', 0); if (!$a->offsetExists('property')) { echo "does not exist\n"; } else { echo "ok\n"; } ?> Expected result: ---------------- ok Actual result: -------------- does not exist ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40442&edit=1

« previous php.bugs (#108710) next »