helly Mon Jun 21 15:15:27 2004 EDT
Added files:
/php-src/ext/spl/tests bug28822.phpt
Modified files:
/php-src NEWS
/php-src/ext/spl spl_array.c
Log:
Fixed bug #28822: ArrayObject::offsetExists() works inverted
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1740&r2=1.1741&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1740 php-src/NEWS:1.1741
--- php-src/NEWS:1.1740 Sun Jun 20 12:49:49 2004
+++ php-src/NEWS Mon Jun 21 15:15:26 2004
@@ -5,6 +5,7 @@
- Fixed bug #28851 (call_user_func_array has typo in error message). (Marcus)
- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
(Marcus)
+- Fixed bug #28822 (ArrayObject::offsetExists() works inverted). (Marcus)
- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
members). (Marcus)
- Fixed bug #28771 (Segfault when using xslt and clone). (Rob)
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.48&r2=1.49&ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.48 php-src/ext/spl/spl_array.c:1.49
--- php-src/ext/spl/spl_array.c:1.48 Sun Jun 20 12:46:27 2004
+++ php-src/ext/spl/spl_array.c Mon Jun 21 15:15:27 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.c,v 1.48 2004/06/20 16:46:27 helly Exp $ */
+/* $Id: spl_array.c,v 1.49 2004/06/21 19:15:27 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -337,7 +337,7 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &index) == FAILURE) {
return;
}
- RETURN_BOOL(spl_array_has_dimension(getThis(), index, 1 TSRMLS_CC) == SUCCESS);
+ RETURN_BOOL(spl_array_has_dimension(getThis(), index, 1 TSRMLS_CC));
} /* }}} */
/* {{{ proto bool ArrayObject::offsetGet(mixed $index)
http://cvs.php.net/co.php/php-src/ext/spl/tests/bug28822.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/bug28822.phpt
+++ php-src/ext/spl/tests/bug28822.phpt
--TEST--
Bug #28822: ArrayObject::offsetExists() works inverted
--FILE--
<?php
$array = new ArrayObject();
$array->offsetSet('key', 'value');
var_dump($array->offsetExists('key'));
var_dump($array->offsetExists('nokey'));
?>
===DONE===
--EXPECT--
bool(true)
bool(false)
===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php