com php-src: Fix separation in array_multisort: ext/stand ard/array.c

From: Date: Sat, 04 Apr 2015 08:52:43 +0000
Subject: com php-src: Fix separation in array_multisort: ext/stand ard/array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86069@lists.php.net to get a copy of this message
Commit: fa15ac4c3774c80a9c00956407fb89725bac7bc7 Author: Nikita Popov <nikic@php.net> Sat, 4 Apr 2015 10:52:43 +0200 Parents: 86906d6a7bbb9c4b69c1ddbd6a3a9bc1efcf091e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fa15ac4c3774c80a9c00956407fb89725bac7bc7 Log: Fix separation in array_multisort This manifested in Zend/tests/bug52939.phpt when running without opcache (no immutablization). Bugs: https://bugs.php.net/52939 Changed paths: M ext/standard/array.c Diff: diff --git a/ext/standard/array.c b/ext/standard/array.c index f90f287..1ab9906 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4412,9 +4412,7 @@ PHP_FUNCTION(array_multisort) ZVAL_DEREF(arg); if (Z_TYPE_P(arg) == IS_ARRAY) { - if (Z_IMMUTABLE_P(arg)) { - zval_copy_ctor(arg); - } + SEPARATE_ARRAY(arg); /* We see the next array, so we update the sort flags of * the previous array and reset the sort flags. */ if (i > 0) {

« previous php.cvs (#86069) next »