summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-12-27 22:32:01 +0000
committerAntony Dovgal <tony2001@php.net>2005-12-27 22:32:01 +0000
commitf046cdf3fa1558232c0658d3587220b5deab68a0 (patch)
tree4c5666e8a8231ce6b0468d13bbe74426c01f7cfb /ext/standard/array.c
parent21e1f5da438ed84202059a09756d0fc7191debcc (diff)
downloadphp-git-f046cdf3fa1558232c0658d3587220b5deab68a0.tar.gz
fix #35821 (array_map() segfaults when exception is throwed from the callback)
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index a083db59a9..bb6338dd73 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -4347,7 +4347,7 @@ PHP_FUNCTION(array_map)
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);