helly Thu Nov 11 14:42:13 2004 EDT Modified files: /php-src/ext/spl spl_array.c Log: - Use exceptions now they work http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.55&r2=1.56&ty=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.55 php-src/ext/spl/spl_array.c:1.56 --- php-src/ext/spl/spl_array.c:1.55 Mon Nov 1 15:57:23 2004 +++ php-src/ext/spl/spl_array.c Thu Nov 11 14:42:11 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.55 2004/11/01 20:57:23 helly Exp $ */ +/* $Id: spl_array.c,v 1.56 2004/11/11 19:42:11 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -643,8 +643,7 @@ if (ZEND_NUM_ARGS() == 0) { return; /* nothing to do */ } -/* exceptions do not work yet - php_set_error_handling(EH_THROW, zend_exception_get_default() 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,8 +657,8 @@ intern->array = other->array; } else { if (!HASH_OF(*array)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passed variable is not an array or object, using empty array instead"); 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"); return; } zval_dtor(intern->array);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php