colder Fri Aug 8 22:07:08 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sqlite sqlite.c /php-src/ext/spl spl_array.c spl_iterators.c spl_observer.c spl_directory.c /php-src/ext/mysqli mysqli_driver.c /php-src/ext/simplexml simplexml.c /php-src/ext/date php_date.c /php-src/ext/dom documentfragment.c element.c processinginstruction.c attr.c document.c entityreference.c comment.c xpath.c text.c cdatasection.c Log: MFH: Fix error_handling usage in various extensions
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.166.2.13.2.9.2.10&r2=1.166.2.13.2.9.2.11&diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.10 php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.11 --- php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.10 Sat Aug 2 04:46:06 2008 +++ php-src/ext/sqlite/sqlite.c Fri Aug 8 22:07:06 2008 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.166.2.13.2.9.2.10 2008/08/02 04:46:06 felipe Exp $ + $Id: sqlite.c,v 1.166.2.13.2.9.2.11 2008/08/08 22:07:06 colder Exp $ */ #ifdef HAVE_CONFIG_H @@ -1520,7 +1520,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.9.2.10 2008/08/02 04:46:06 felipe Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.9.2.11 2008/08/08 22:07:06 colder Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1687,10 +1687,9 @@ zval *errmsg = NULL; zval *object = getThis(); - php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); + zend_replace_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception, NULL TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { - php_std_error_handling(); return; } if (errmsg) { @@ -1701,7 +1700,6 @@ if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { /* resolve the fully-qualified path name to use as the hash key */ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { - php_std_error_handling(); if (object) { RETURN_NULL(); } else { @@ -1711,7 +1709,6 @@ if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(fullpath TSRMLS_CC)) { - php_std_error_handling(); efree(fullpath); if (object) { RETURN_NULL(); @@ -1726,7 +1723,6 @@ if (fullpath) { efree(fullpath); } - php_std_error_handling(); } /* }}} */ @@ -1739,10 +1735,9 @@ int filename_len; zval *errmsg = NULL; - php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC); + zend_replace_error_handling(EH_THROW, sqlite_ce_exception, NULL TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { - php_std_error_handling(); RETURN_NULL(); } if (errmsg) { @@ -1753,14 +1748,12 @@ if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { /* resolve the fully-qualified path name to use as the hash key */ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { - php_std_error_handling(); RETURN_NULL(); } if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(fullpath TSRMLS_CC)) { efree(fullpath); - php_std_error_handling(); RETURN_NULL(); } } @@ -1769,7 +1762,6 @@ if (fullpath) { efree(fullpath); } - php_std_error_handling(); } /* }}} */ @@ -2425,11 +2417,11 @@ zend_fcall_info_cache fcc; zval *retval_ptr; zval *ctor_params = NULL; + zend_error_handling error_handling; - php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); + zend_replace_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception, &error_handling TSRMLS_CC); if (object) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|szb", &class_name, &class_name_len, &ctor_params, &decode_binary)) { - php_std_error_handling(); return; } RES_FROM_OBJECT(res, object); @@ -2440,7 +2432,6 @@ } } else { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|szb", &zres, &class_name, &class_name_len, &ctor_params, &decode_binary)) { - php_std_error_handling(); return; } ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); @@ -2453,21 +2444,19 @@ if (!ce) { zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not find class '%s'", class_name); - php_std_error_handling(); return; } if (res->curr_row < res->nrows) { php_sqlite_fetch_array(res, PHPSQLITE_ASSOC, decode_binary, 1, &dataset TSRMLS_CC); } else { - php_std_error_handling(); RETURN_FALSE; } object_and_properties_init(return_value, ce, NULL); zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC); - php_std_error_handling(); /* before calling the ctor */ + zend_restore_error_handling(&error_handling TSRMLS_CC); if (ce->constructor) { fci.size = sizeof(fci); http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.20&r2=1.71.2.17.2.13.2.21&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.20 php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.21 --- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.20 Mon Aug 4 11:45:21 2008 +++ php-src/ext/spl/spl_array.c Fri Aug 8 22:07:07 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.71.2.17.2.13.2.20 2008/08/04 11:45:21 robinf Exp $ */ +/* $Id: spl_array.c,v 1.71.2.17.2.13.2.21 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -909,7 +909,6 @@ intern->array = *array; } else { if (Z_TYPE_PP(array) != IS_OBJECT && Z_TYPE_PP(array) != IS_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", 0 TSRMLS_CC); return; } @@ -928,7 +927,6 @@ zend_object_get_properties_t handler = Z_OBJ_HANDLER_PP(array, get_properties); if ((handler != std_object_handlers.get_properties && handler != spl_array_get_properties) || !spl_array_get_hash_table(intern, 0 TSRMLS_CC)) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_PP(array)->name, intern->std.ce->name); } } @@ -985,19 +983,18 @@ if (ZEND_NUM_ARGS() == 0) { return; /* nothing to do */ } - php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); + + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC); intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|ls", &array, &ar_flags, &class_name, &class_name_len) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } if (ZEND_NUM_ARGS() > 2) { if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } intern->ce_get_iterator = *pce_get_iterator; @@ -1007,7 +1004,6 @@ spl_array_set_array(object, intern, array, ar_flags, ZEND_NUM_ARGS() == 1 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1022,13 +1018,11 @@ zend_class_entry ** pce_get_iterator; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &class_name, &class_name_len) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } intern->ce_get_iterator = *pce_get_iterator; http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.28.2.12&r2=1.73.2.30.2.28.2.13&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.12 php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.13 --- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.12 Sat Aug 2 04:46:06 2008 +++ php-src/ext/spl/spl_iterators.c Fri Aug 8 22:07:07 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.12 2008/08/02 04:46:06 felipe Exp $ */ +/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.13 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -425,7 +425,7 @@ long mode, flags; int inc_refcount = 1; - php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC); switch(rit_type) { case RIT_RecursiveTreeIterator: { @@ -480,7 +480,6 @@ if (iterator && !inc_refcount) { zval_ptr_dtor(&iterator); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception(spl_ce_InvalidArgumentException, "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); return; } @@ -531,7 +530,6 @@ intern->iterators[0].ce = ce_iterator; intern->iterators[0].state = RS_START; - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* {{{ proto void RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException @@ -918,11 +916,12 @@ static void spl_recursive_tree_iterator_get_entry(spl_recursive_it_object * object, zval * return_value TSRMLS_DC) { zend_object_iterator *iterator = object->iterators[object->level].iterator; - zval **data; + zval **data; + zend_error_handling error_handling; iterator->funcs->get_current_data(iterator, &data TSRMLS_CC); - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, &error_handling TSRMLS_CC); RETVAL_ZVAL(*data, 1, 0); if (Z_TYPE_P(return_value) == IS_ARRAY) { zval_dtor(return_value); @@ -930,7 +929,7 @@ } else { convert_to_string(return_value); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); } static void spl_recursive_tree_iterator_get_postfix(spl_recursive_it_object * object, zval * return_value TSRMLS_DC) @@ -1251,7 +1250,7 @@ return NULL; } - php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC); intern->dit_type = dit_type; switch (dit_type) { @@ -1259,16 +1258,13 @@ intern->u.limit.offset = 0; /* start at beginning */ intern->u.limit.count = -1; /* get all */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|ll", &zobject, ce_inner, &intern->u.limit.offset, &intern->u.limit.count) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } if (intern->u.limit.offset < 0) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception(spl_ce_OutOfRangeException, "Parameter offset must be > 0", 0 TSRMLS_CC); return NULL; } if (intern->u.limit.count < 0 && intern->u.limit.count != -1) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception(spl_ce_OutOfRangeException, "Parameter count must either be -1 or a value greater than or equal 0", 0 TSRMLS_CC); return NULL; } @@ -1278,11 +1274,9 @@ case DIT_RecursiveCachingIterator: { long flags = CIT_CALL_TOSTRING; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &zobject, ce_inner, &flags) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } if (spl_cit_check_flags(flags) != SUCCESS) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception(spl_ce_InvalidArgumentException, "Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_CURRENT", 0 TSRMLS_CC); return NULL; } @@ -1297,7 +1291,6 @@ int class_name_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|s", &zobject, ce_inner, &class_name, &class_name_len) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } ce = Z_OBJCE_P(zobject); @@ -1308,7 +1301,6 @@ || !(*pce_cast)->get_iterator ) { zend_throw_exception(spl_ce_LogicException, "Class to downcast to not found or not base class or does not implement Traversable", 0 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } ce = *pce_cast; @@ -1319,12 +1311,10 @@ if (retval) { zval_ptr_dtor(&retval); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), zend_ce_traversable TSRMLS_CC)) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } zobject = retval; @@ -1338,7 +1328,6 @@ spl_instantiate(spl_ce_ArrayIterator, &intern->u.append.zarrayit, 1 TSRMLS_CC); zend_call_method_with_0_params(&intern->u.append.zarrayit, spl_ce_ArrayIterator, &spl_ce_ArrayIterator->constructor, "__construct", NULL); intern->u.append.iterator = spl_ce_ArrayIterator->get_iterator(spl_ce_ArrayIterator, intern->u.append.zarrayit, 0 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return intern; #if HAVE_PCRE || HAVE_BUNDLED_PCRE case DIT_RegexIterator: @@ -1351,12 +1340,10 @@ intern->u.regex.flags = 0; intern->u.regex.preg_flags = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|lll", &zobject, ce_inner, ®ex, ®ex_len, &mode, &intern->u.regex.flags, &intern->u.regex.preg_flags) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } if (mode < 0 || mode >= REGIT_MODE_MAX) { zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, "Illegal mode %ld", mode); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } intern->u.regex.mode = mode; @@ -1364,7 +1351,6 @@ intern->u.regex.pce = pcre_get_compiled_regex_cache(regex, regex_len TSRMLS_CC); if (intern->u.regex.pce == NULL) { /* pcre_get_compiled_regex_cache has already sent error */ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } intern->u.regex.pce->refcount++; @@ -1373,13 +1359,12 @@ #endif default: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &zobject, ce_inner) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } break; } - php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (inc_refcount) { Z_ADDREF_P(zobject); @@ -1389,7 +1374,6 @@ intern->inner.object = zend_object_store_get_object(zobject TSRMLS_CC); intern->inner.iterator = intern->inner.ce->get_iterator(intern->inner.ce, zobject, 0 TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return intern; } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c?r1=1.2.2.6.2.3.2.8&r2=1.2.2.6.2.3.2.9&diff_format=u Index: php-src/ext/spl/spl_observer.c diff -u php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.8 php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.9 --- php-src/ext/spl/spl_observer.c:1.2.2.6.2.3.2.8 Tue Jul 22 22:54:35 2008 +++ php-src/ext/spl/spl_observer.c Fri Aug 8 22:07:07 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.8 2008/07/22 22:54:35 helly Exp $ */ +/* $Id: spl_observer.c,v 1.2.2.6.2.3.2.9 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -640,15 +640,12 @@ spl_SplObjectStorage *intern; long flags = MIT_NEED_ALL|MIT_KEYS_NUMERIC; - php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flags) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); intern->flags = flags; } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.28&r2=1.45.2.27.2.23.2.29&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.28 php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.29 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.28 Fri Jul 25 08:23:07 2008 +++ php-src/ext/spl/spl_directory.c Fri Aug 8 22:07:07 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.28 2008/07/25 08:23:07 dmitry Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.29 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -391,7 +391,7 @@ return NULL; } - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); ce = ce ? ce : source->info_class; return_value->value.obj = spl_filesystem_object_new_ex(ce, &intern TSRMLS_CC); @@ -406,8 +406,6 @@ spl_filesystem_info_set_filename(intern, file_path, file_path_len, use_copy TSRMLS_CC); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - return intern; } /* }}} */ @@ -416,8 +414,9 @@ spl_filesystem_object *intern; zend_bool use_include_path = 0; zval *arg1, *arg2; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC); switch (source->type) { case SPL_FS_INFO: @@ -426,7 +425,7 @@ case SPL_FS_DIR: if (!source->u.dir.entry.d_name[0]) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Could not open file"); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); return NULL; } } @@ -477,7 +476,7 @@ if (ht && zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sbr", &intern->u.file.open_mode, &intern->u.file.open_mode_len, &use_include_path, &intern->u.file.zcontext) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); intern->u.file.open_mode = NULL; zval_dtor(return_value); Z_TYPE_P(return_value) = IS_NULL; @@ -485,7 +484,7 @@ } if (spl_filesystem_file_open(intern, use_include_path, 0 TSRMLS_CC) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); zval_dtor(return_value); Z_TYPE_P(return_value) = IS_NULL; return NULL; @@ -493,11 +492,11 @@ } break; case SPL_FS_DIR: - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Operation not supported"); return NULL; } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_restore_error_handling(&error_handling TSRMLS_CC); return NULL; } /* }}} */ @@ -605,7 +604,7 @@ int parsed, len; long flags; - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, NULL TSRMLS_CC); if (ctor_flags & DIT_CTOR_FLAGS) { flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO; @@ -621,11 +620,9 @@ flags |= SPL_FILE_DIR_UNIXPATHS; } if (parsed == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } if (!len) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Directory name must not be empty."); return; } @@ -642,7 +639,6 @@ intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -905,7 +901,7 @@ /* {{{ proto void SplFileInfo::__construct(string file_name) Cronstructs a new SplFileInfo from a path. */ -/* php_set_error_handling() is used to throw exceptions in case +/* zend_replace_error_handling() is used to throw exceptions in case the constructor fails. Here we use this to ensure the object has a valid directory resource. @@ -918,10 +914,9 @@ char *path; int len; - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -930,8 +925,6 @@ spl_filesystem_info_set_filename(intern, path, len, 1 TSRMLS_CC); /* intern->type = SPL_FS_INFO; already set */ - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -941,10 +934,9 @@ { \ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ \ - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);\ + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC);\ spl_filesystem_object_get_file_name(intern TSRMLS_CC); \ php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \ - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);\ } /* }}} */ @@ -1031,7 +1023,7 @@ int ret; char buff[MAXPATHLEN]; - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); #ifdef HAVE_SYMLINK ret = readlink(intern->file_name, buff, MAXPATHLEN-1); @@ -1048,7 +1040,6 @@ RETVAL_STRINGL(buff, ret, 1); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1061,7 +1052,7 @@ char buff[MAXPATHLEN]; char *filename; - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { spl_filesystem_object_get_file_name(intern TSRMLS_CC); @@ -1084,7 +1075,6 @@ } else { RETVAL_FALSE; } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ #endif @@ -1106,13 +1096,11 @@ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_class_entry *ce = spl_ce_SplFileObject; - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == SUCCESS) { intern->file_class = ce; } - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1123,13 +1111,11 @@ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_class_entry *ce = spl_ce_SplFileInfo; - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == SUCCESS) { intern->info_class = ce; } - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1140,13 +1126,11 @@ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_class_entry *ce = intern->info_class; - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == SUCCESS) { spl_filesystem_object_create_type(ht, intern, SPL_FS_INFO, ce, return_value TSRMLS_CC); } - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1157,7 +1141,7 @@ spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_class_entry *ce = intern->info_class; - php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == SUCCESS) { int path_len; @@ -1166,8 +1150,6 @@ spl_filesystem_object_create_info(intern, path, path_len, 1, ce, return_value TSRMLS_CC); } } - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1967,7 +1949,7 @@ char *tmp_path; int tmp_path_len; - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); intern->u.file.open_mode = "r"; intern->u.file.open_mode_len = 1; @@ -1976,7 +1958,6 @@ &intern->file_name, &intern->file_name_len, &intern->u.file.open_mode, &intern->u.file.open_mode_len, &use_include_path, &intern->u.file.zcontext) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -2006,7 +1987,6 @@ intern->_path = estrndup(intern->u.file.stream->orig_path, intern->_path_len); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ /* {{{ proto void SplTempFileObject::__construct([int max_memory]) @@ -2017,10 +1997,9 @@ char tmp_fname[48]; spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &max_memory) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -2042,8 +2021,6 @@ intern->_path_len = 0; intern->_path = estrndup("", 0); } - - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ /* {{{ proto void SplFileObject::rewind() http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_driver.c?r1=1.4.2.3.2.2.2.4&r2=1.4.2.3.2.2.2.5&diff_format=u Index: php-src/ext/mysqli/mysqli_driver.c diff -u php-src/ext/mysqli/mysqli_driver.c:1.4.2.3.2.2.2.4 php-src/ext/mysqli/mysqli_driver.c:1.4.2.3.2.2.2.5 --- php-src/ext/mysqli/mysqli_driver.c:1.4.2.3.2.2.2.4 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/mysqli_driver.c Fri Aug 8 22:07:07 2008 @@ -78,8 +78,8 @@ static int driver_report_write(mysqli_object *obj, zval *value TSRMLS_DC) { MyG(report_mode) = Z_LVAL_P(value); - php_set_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, - zend_exception_get_default(TSRMLS_C) TSRMLS_CC); + /*FIXME*/ + zend_replace_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, NULL, NULL TSRMLS_CC); return SUCCESS; } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.16&r2=1.151.2.22.2.35.2.17&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.16 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.17 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.16 Wed Jul 9 21:27:28 2008 +++ php-src/ext/simplexml/simplexml.c Fri Aug 8 22:07:07 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.35.2.16 2008/07/09 21:27:28 colder Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.35.2.17 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2176,14 +2176,14 @@ xmlDocPtr docp; long options = 0; zend_bool is_url = 0, isprefix = 0; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lbsb", &data, &data_len, &options, &is_url, &ns, &ns_len, &isprefix) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); docp = is_url ? xmlReadFile(data, NULL, options) : xmlReadMemory(data, data_len, NULL, NULL, options); @@ -2558,7 +2558,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.16 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.17 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.53&r2=1.43.2.45.2.51.2.54&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.53 php-src/ext/date/php_date.c:1.43.2.45.2.51.2.54 --- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.53 Sun Aug 3 16:45:15 2008 +++ php-src/ext/date/php_date.c Fri Aug 8 22:07:07 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.51.2.53 2008/08/03 16:45:15 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.51.2.54 2008/08/08 22:07:07 colder Exp $ */ #include "php.h" #include "php_streams.h" @@ -2519,11 +2519,11 @@ char *time_str = NULL; int time_str_len = 0; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) { date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3193,7 +3193,7 @@ timelib_tzinfo *tzi = NULL; php_timezone_obj *tzobj; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) { if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) { tzobj = zend_object_store_get_object(getThis() TSRMLS_CC); @@ -3204,7 +3204,6 @@ ZVAL_NULL(getThis()); } } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3537,7 +3536,7 @@ php_interval_obj *diobj; timelib_rel_time *reltime; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &interval_string, &interval_string_length) == SUCCESS) { if (date_interval_initialize(&reltime, interval_string, interval_string_length TSRMLS_CC) == SUCCESS) { diobj = zend_object_store_get_object(getThis() TSRMLS_CC); @@ -3547,7 +3546,6 @@ ZVAL_NULL(getThis()); } } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3691,7 +3689,7 @@ int isostr_len = 0; timelib_time *clone; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_date, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &isostr, &isostr_len, &options) == FAILURE) { @@ -3762,7 +3760,6 @@ dpobj->recurrences = recurrences + dpobj->include_start_date; dpobj->initialized = 1; - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/dom/documentfragment.c?r1=1.15.2.1.2.1.2.3&r2=1.15.2.1.2.1.2.4&diff_format=u Index: php-src/ext/dom/documentfragment.c diff -u php-src/ext/dom/documentfragment.c:1.15.2.1.2.1.2.3 php-src/ext/dom/documentfragment.c:1.15.2.1.2.1.2.4 --- php-src/ext/dom/documentfragment.c:1.15.2.1.2.1.2.3 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/documentfragment.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c,v 1.15.2.1.2.1.2.3 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: documentfragment.c,v 1.15.2.1.2.1.2.4 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -59,14 +59,14 @@ zval *id; xmlNodePtr nodep = NULL, oldnode = NULL; dom_object *intern; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); nodep = xmlNewDocFragment(NULL); if (!nodep) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/element.c?r1=1.36.2.4.2.8.2.5&r2=1.36.2.4.2.8.2.6&diff_format=u Index: php-src/ext/dom/element.c diff -u php-src/ext/dom/element.c:1.36.2.4.2.8.2.5 php-src/ext/dom/element.c:1.36.2.4.2.8.2.6 --- php-src/ext/dom/element.c:1.36.2.4.2.8.2.5 Sat Jun 14 11:22:57 2008 +++ php-src/ext/dom/element.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.36.2.4.2.8.2.5 2008/06/14 11:22:57 rrichards Exp $ */ +/* $Id: element.c,v 1.36.2.4.2.8.2.6 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -181,13 +181,13 @@ int errorcode = 0, uri_len = 0; int name_len, value_len = 0, name_valid; xmlNsPtr nsptr = NULL; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/processinginstruction.c?r1=1.17.2.1.2.1.2.4&r2=1.17.2.1.2.1.2.5&diff_format=u Index: php-src/ext/dom/processinginstruction.c diff -u php-src/ext/dom/processinginstruction.c:1.17.2.1.2.1.2.4 php-src/ext/dom/processinginstruction.c:1.17.2.1.2.1.2.5 --- php-src/ext/dom/processinginstruction.c:1.17.2.1.2.1.2.4 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/processinginstruction.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: processinginstruction.c,v 1.17.2.1.2.1.2.4 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: processinginstruction.c,v 1.17.2.1.2.1.2.5 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -57,14 +57,14 @@ dom_object *intern; char *name, *value = NULL; int name_len, value_len, name_valid; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.18.2.2.2.2.2.4&r2=1.18.2.2.2.2.2.5&diff_format=u Index: php-src/ext/dom/attr.c diff -u php-src/ext/dom/attr.c:1.18.2.2.2.2.2.4 php-src/ext/dom/attr.c:1.18.2.2.2.2.2.5 --- php-src/ext/dom/attr.c:1.18.2.2.2.2.2.4 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/attr.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: attr.c,v 1.18.2.2.2.2.2.4 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: attr.c,v 1.18.2.2.2.2.2.5 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -65,14 +65,14 @@ dom_object *intern; char *name, *value = NULL; int name_len, value_len, name_valid; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_attr_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC); name_valid = xmlValidateName((xmlChar *) name, 0); http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.5.2.5&r2=1.68.2.3.2.5.2.6&diff_format=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.68.2.3.2.5.2.5 php-src/ext/dom/document.c:1.68.2.3.2.5.2.6 --- php-src/ext/dom/document.c:1.68.2.3.2.5.2.5 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/document.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.68.2.3.2.5.2.5 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: document.c,v 1.68.2.3.2.5.2.6 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1501,14 +1501,14 @@ dom_object *intern; char *encoding, *version = NULL; int encoding_len = 0, version_len = 0, refcount; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); docp = xmlNewDoc(version); if (!docp) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/entityreference.c?r1=1.12.2.1.2.2.2.3&r2=1.12.2.1.2.2.2.4&diff_format=u Index: php-src/ext/dom/entityreference.c diff -u php-src/ext/dom/entityreference.c:1.12.2.1.2.2.2.3 php-src/ext/dom/entityreference.c:1.12.2.1.2.2.2.4 --- php-src/ext/dom/entityreference.c:1.12.2.1.2.2.2.3 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/entityreference.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entityreference.c,v 1.12.2.1.2.2.2.3 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: entityreference.c,v 1.12.2.1.2.2.2.4 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -56,14 +56,14 @@ dom_object *intern; char *name; int name_len, name_valid; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); name_valid = xmlValidateName((xmlChar *) name, 0); if (name_valid != 0) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/comment.c?r1=1.11.2.1.2.1.2.3&r2=1.11.2.1.2.1.2.4&diff_format=u Index: php-src/ext/dom/comment.c diff -u php-src/ext/dom/comment.c:1.11.2.1.2.1.2.3 php-src/ext/dom/comment.c:1.11.2.1.2.1.2.4 --- php-src/ext/dom/comment.c:1.11.2.1.2.1.2.3 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/comment.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: comment.c,v 1.11.2.1.2.1.2.3 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: comment.c,v 1.11.2.1.2.1.2.4 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -56,14 +56,14 @@ dom_object *intern; char *value = NULL; int value_len; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_comment_class_entry, &value, &value_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); nodep = xmlNewComment((xmlChar *) value); if (!nodep) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/xpath.c?r1=1.26.2.1.2.1.2.4&r2=1.26.2.1.2.1.2.5&diff_format=u Index: php-src/ext/dom/xpath.c diff -u php-src/ext/dom/xpath.c:1.26.2.1.2.1.2.4 php-src/ext/dom/xpath.c:1.26.2.1.2.1.2.5 --- php-src/ext/dom/xpath.c:1.26.2.1.2.1.2.4 Tue Jan 29 15:55:23 2008 +++ php-src/ext/dom/xpath.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c,v 1.26.2.1.2.1.2.4 2008/01/29 15:55:23 sebastian Exp $ */ +/* $Id: xpath.c,v 1.26.2.1.2.1.2.5 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -275,14 +275,14 @@ dom_object *docobj; dom_xpath_object *intern; xmlXPathContextPtr ctx, oldctx; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); DOM_GET_OBJ(docp, doc, xmlDocPtr, docobj); ctx = xmlXPathNewContext(docp); http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.23.2.1.2.4.2.3&r2=1.23.2.1.2.4.2.4&diff_format=u Index: php-src/ext/dom/text.c diff -u php-src/ext/dom/text.c:1.23.2.1.2.4.2.3 php-src/ext/dom/text.c:1.23.2.1.2.4.2.4 --- php-src/ext/dom/text.c:1.23.2.1.2.4.2.3 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/text.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: text.c,v 1.23.2.1.2.4.2.3 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: text.c,v 1.23.2.1.2.4.2.4 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -74,14 +74,14 @@ dom_object *intern; char *value = NULL; int value_len; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); nodep = xmlNewText((xmlChar *) value); if (!nodep) { http://cvs.php.net/viewvc.cgi/php-src/ext/dom/cdatasection.c?r1=1.11.2.1.2.1.2.3&r2=1.11.2.1.2.1.2.4&diff_format=u Index: php-src/ext/dom/cdatasection.c diff -u php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.3 php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.4 --- php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.3 Mon Feb 4 15:22:59 2008 +++ php-src/ext/dom/cdatasection.c Fri Aug 8 22:07:07 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdatasection.c,v 1.11.2.1.2.1.2.3 2008/02/04 15:22:59 sebastian Exp $ */ +/* $Id: cdatasection.c,v 1.11.2.1.2.1.2.4 2008/08/08 22:07:07 colder Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -56,14 +56,14 @@ dom_object *intern; char *value = NULL; int value_len; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_cdatasection_class_entry, &value, &value_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); nodep = xmlNewCDataBlock(NULL, (xmlChar *) value, value_len); if (!nodep) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php