summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/array.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index f90f287a1f..1ab9906311 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) {