Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

From: Date: Mon, 09 Jun 2003 00:16:26 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1355@lists.php.net to get a copy of this message
MFH? --Jani On Sun, 8 Jun 2003, Zeev Suraski wrote: >zeev Sun Jun 8 10:00:11 2003 EDT > > Modified files: > /ZendEngine2 zend_builtin_functions.c > Log: > Fix set_error_handler() > > >Index: ZendEngine2/zend_builtin_functions.c >diff -u ZendEngine2/zend_builtin_functions.c:1.191 ZendEngine2/zend_builtin_functions.c:1.192 >--- ZendEngine2/zend_builtin_functions.c:1.191 Wed Jun 4 04:16:55 2003 >+++ ZendEngine2/zend_builtin_functions.c Sun Jun 8 10:00:11 2003 >@@ -17,7 +17,7 @@ > +----------------------------------------------------------------------+ > */ > >-/* $Id: zend_builtin_functions.c,v 1.191 2003/06/04 08:16:55 stas Exp $ */ >+/* $Id: zend_builtin_functions.c,v 1.192 2003/06/08 14:00:11 zeev Exp $ */ > > #include "zend.h" > #include "zend_API.h" >@@ -964,17 +964,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 call back. >- * 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)); > > > > -- https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0&currency_code=EUR

« previous php.zend-engine.cvs (#1355) next »