summaryrefslogtreecommitdiff
path: root/ext/spl/spl_array.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-11-11 20:06:23 +0000
committerMarcus Boerger <helly@php.net>2004-11-11 20:06:23 +0000
commit08cc69dbf45ae60e223306cba95029df746a3e76 (patch)
tree104cc8c6c935aa275648ad62e2214b68c16048e5 /ext/spl/spl_array.c
parent4c8bca469f9c577026e8fe5885d82c8c74b4b32c (diff)
downloadphp-git-08cc69dbf45ae60e223306cba95029df746a3e76.tar.gz
- Correct exception throwing
Diffstat (limited to 'ext/spl/spl_array.c')
-rwxr-xr-xext/spl/spl_array.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index b00a3f8534..c80bb8d1bb 100755
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -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 @@ SPL_METHOD(Array, __construct)
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 @@ SPL_METHOD(Array, __construct)
} 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);