iliaa           Thu Aug  3 14:49:11 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/spl    php_spl.c 
    /php-src    NEWS 
  Log:
  Fixed bug #38303 (spl_autoload_register() supress all errors silently).   
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.4&r2=1.52.2.28.2.5&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.4 
php-src/ext/spl/php_spl.c:1.52.2.28.2.5
--- php-src/ext/spl/php_spl.c:1.52.2.28.2.4     Sun Jul  9 10:22:27 2006
+++ php-src/ext/spl/php_spl.c   Thu Aug  3 14:49:11 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_spl.c,v 1.52.2.28.2.4 2006/07/09 10:22:27 helly Exp $ */
+/* $Id: php_spl.c,v 1.52.2.28.2.5 2006/08/03 14:49:11 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
        #include "config.h"
@@ -213,10 +213,25 @@
        zend_file_handle file_handle;
        zend_op_array *new_op_array;
        zval *result = NULL;
+       zval err_mode;
+       int ret;
 
        class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, 
file_extension);
 
-       if (zend_stream_open(class_file, &file_handle TSRMLS_CC) == SUCCESS) {
+       ZVAL_LONG(&err_mode, EG(error_reporting));
+       if (Z_LVAL(err_mode)) {
+               php_alter_ini_entry("error_reporting", 
sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
+       }
+
+       ret = zend_stream_open(class_file, &file_handle TSRMLS_CC);
+
+       if (!EG(error_reporting) && Z_LVAL(err_mode) != EG(error_reporting)) {
+               convert_to_string(&err_mode);
+               zend_alter_ini_entry("error_reporting", 
sizeof("error_reporting"), Z_STRVAL(err_mode), Z_STRLEN(err_mode), 
ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
+               zendi_zval_dtor(err_mode);
+       }
+
+       if (ret == SUCCESS) {
                if (!file_handle.opened_path) {
                        file_handle.opened_path = estrndup(class_file, 
class_file_len);
                }
@@ -230,7 +245,7 @@
                if (new_op_array) {
                        EG(return_value_ptr_ptr) = &result;
                        EG(active_op_array) = new_op_array;
-       
+
                        zend_execute(new_op_array TSRMLS_CC);
        
                        destroy_op_array(new_op_array TSRMLS_CC);
@@ -266,9 +281,6 @@
                RETURN_FALSE;
        }
 
-       ZVAL_LONG(&err_mode, EG(error_reporting));
-       php_alter_ini_entry("error_reporting", sizeof("error_reporting"), "0", 
1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); 
-
        copy = pos1 = estrdup(ZEND_NUM_ARGS() > 1 ? file_exts : 
SPL_G(autoload_extensions));
        lc_name = zend_str_tolower_dup(class_name, class_name_len);
        while(pos1 && *pos1 && !EG(exception)) {
@@ -289,12 +301,6 @@
                efree(copy);
        }
 
-       if (!EG(error_reporting) && Z_LVAL(err_mode) != EG(error_reporting)) {
-               convert_to_string(&err_mode);
-               zend_alter_ini_entry("error_reporting", 
sizeof("error_reporting"), Z_STRVAL(err_mode), Z_STRLEN(err_mode), 
ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
-               zendi_zval_dtor(err_mode);
-       }
-
        EG(return_value_ptr_ptr) = original_return_value;
        EG(opline_ptr) = original_opline_ptr;
        EG(active_op_array) = original_active_op_array;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.180&r2=1.2027.2.547.2.181&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.180 php-src/NEWS:1.2027.2.547.2.181
--- php-src/NEWS:1.2027.2.547.2.180     Thu Aug  3 14:17:58 2006
+++ php-src/NEWS        Thu Aug  3 14:49:11 2006
@@ -30,6 +30,8 @@
 - Fixed phpinfo() cutoff of variables at \0. (Ilia)
 - Fixed a bug in the filter extension that prevented magic_quotes_gpc from
   being applied when RAW filter is used. (Ilia)
+- Fixed bug #38303 (spl_autoload_register() supress all errors silently).
+  (Ilia)
 - Fixed bug #38289 (segfault in session_decode() when _SESSION is NULL). 
   (Tony)
 - Fixed bug #38278 (session_cache_expire()'s value does not match phpinfo's 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to