From: Antony Dovgal Date: Tue, 27 Dec 2005 22:33:40 +0000 (+0000) Subject: MF51: fix #35821 (array_map() segfaults when exception is throwed from the callback) X-Git-Tag: RELEASE_1_0_4~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41973d8969575b5068b9b8ae887c1480b2898baa;p=php MF51: fix #35821 (array_map() segfaults when exception is throwed from the callback) --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 40b8d13574..b7225ae15a 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4603,7 +4603,7 @@ PHP_FUNCTION(array_map) fci.params = ¶ms[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);