php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55416
Patch skip-array-map-warning-on-exception.patch revision 2011-08-13 20:27 UTC by roan dot kattouw at gmail dot com

Patch skip-array-map-warning-on-exception.patch for Arrays related Bug #55416

Patch version 2011-08-13 20:27 UTC

Return to Bug #55416 | Download this patch
Patch Revisions:

Developer: roan.kattouw@gmail.com

--- ext/standard/array.c	2011-04-06 12:23:06.000000000 +0200
+++ ext/standard/array.c	2011-08-13 22:23:34.458469589 +0200
@@ -4325,7 +4325,9 @@
 			fci.no_separation = 0;
 
 			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");
+				/* Don't throw this error if the callback threw an exception (bug 55416) */
+				if(!EG(exception))
+					php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the map callback");
 				efree(array_len);
 				efree(args);
 				efree(array_pos);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC