tony2001                Tue Dec 27 22:33:40 2005 EDT

  Modified files:              
    /php-src/ext/standard       array.c 
  Log:
  MF51: fix #35821 (array_map() segfaults when exception is throwed from the 
callback)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.333&r2=1.334&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.333 php-src/ext/standard/array.c:1.334
--- php-src/ext/standard/array.c:1.333  Mon Dec  5 22:53:15 2005
+++ php-src/ext/standard/array.c        Tue Dec 27 22:33:40 2005
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.333 2005/12/05 22:53:15 sniper Exp $ */
+/* $Id: array.c,v 1.334 2005/12/27 22:33:40 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -4603,7 +4603,7 @@
                        fci.params = &params[1];
                        fci.no_separation = 0;
 
-                       if (!zend_call_function(&fci, &fci_cache TSRMLS_CC) == 
SUCCESS && result) {
+                       if (!zend_call_function(&fci, &fci_cache TSRMLS_CC) == 
SUCCESS || !result) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "An 
error occurred while invoking the map callback");
                                efree(array_len);
                                efree(args);

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

Reply via email to