helly Thu Nov 11 15:06:26 2004 EDT
Modified files:
/php-src/ext/spl spl_array.c
Log:
- Correct exception throwing
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.56&r2=1.57&ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.56 php-src/ext/spl/spl_array.c:1.57
--- php-src/ext/spl/spl_array.c:1.56 Thu Nov 11 14:42:11 2004
+++ php-src/ext/spl/spl_array.c Thu Nov 11 15:06:23 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.c,v 1.56 2004/11/11 19:42:11 helly Exp $ */
+/* $Id: spl_array.c,v 1.57 2004/11/11 20:06:23 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -26,12 +26,14 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "zend_interfaces.h"
+#include "zend_exceptions.h"
#include "php_spl.h"
#include "spl_functions.h"
#include "spl_engine.h"
#include "spl_iterators.h"
#include "spl_array.h"
+#include "spl_exceptions.h"
SPL_METHOD(Array, __construct);
SPL_METHOD(Array, getIterator);
@@ -643,7 +645,7 @@
if (ZEND_NUM_ARGS() == 0) {
return; /* nothing to do */
}
- php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException
TSRMLS_CC);*/
+ php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException
TSRMLS_CC);
intern = (spl_array_object*)zend_object_store_get_object(object
TSRMLS_CC);
@@ -658,7 +660,7 @@
} else {
if (!HASH_OF(*array)) {
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
- zend_throw_exception(spl_ce_InvalidArgumentException,
"Passed variable is not an array or object, using empty array instead");
+ zend_throw_exception(spl_ce_InvalidArgumentException,
"Passed variable is not an array or object, using empty array instead", 0
TSRMLS_CC);
return;
}
zval_dtor(intern->array);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php