cvs: Zend(PHP_4_3) / zend_builtin_functions.c
| From: | Zeev Suraski | Date: | Mon, 09 Jun 2003 08:07:55 +0000 |
| Subject: | cvs: Zend(PHP_4_3) / zend_builtin_functions.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1357@lists.php.net to get a copy of this message | ||
zeev Mon Jun 9 04:07:55 2003 EDT
Modified files: (Branch: PHP_4_3)
/Zend zend_builtin_functions.c
Log:
MFH
Index: Zend/zend_builtin_functions.c
diff -u Zend/zend_builtin_functions.c:1.124.2.7 Zend/zend_builtin_functions.c:1.124.2.8
--- Zend/zend_builtin_functions.c:1.124.2.7 Wed May 21 17:43:50 2003
+++ Zend/zend_builtin_functions.c Mon Jun 9 04:07:55 2003
@@ -891,17 +891,11 @@
}
ALLOC_ZVAL(EG(user_error_handler));
-#ifdef JANI_0
- /*
- * This part would never be reached unless there is something
- * wrong with the engine as empty string can not be valid callback.
- * See bug #23619 for more information why this is left here.
- * (this only applies to non-debug-builds.)
- */
- if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
- zend_error(E_ERROR, "%s(): This should never happen! '%s'",
get_active_function_name(TSRMLS_C), error_handler);
- }
-#endif
+ if (!zend_is_true(*error_handler)) { /* unset user-defined handler */
+ FREE_ZVAL(EG(user_error_handler));
+ EG(user_error_handler) = NULL;
+ RETURN_TRUE;
+ }
*EG(user_error_handler) = **error_handler;
zval_copy_ctor(EG(user_error_handler));