Re: cvs: php-src /ext/standard array.c
| From: | Marcus Boerger | Date: | Tue, 27 Dec 2005 23:12:13 +0000 |
| Subject: | Re: cvs: php-src /ext/standard array.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-36275@lists.php.net to get a copy of this message | ||
Hello Antony,
that looks pretty wrong (actually was wrong before already). The code
should read:
if (zend_call_function(&fci, &fci_cache TSRMLS_CC) != SUCCESS || !result) {
or like this:
if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == FAILURE || !result) {
best regards
marcus
Tuesday, December 27, 2005, 11:33:40 PM, you wrote:
> 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=uZ-ÜRðw“
> zäDë^5-
> 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 = ¶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);
Best regards,
Marcus