Bug #69532 [Opn]: array_multisort is chocking when using it's own constants
| From: | nikic@php.net | Date: | Sat, 25 Apr 2015 15:09:37 +0000 |
| Subject: | Bug #69532 [Opn]: array_multisort is chocking when using it's own constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192337@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69532&edit=1
ID: 69532
Updated by: nikic@php.net
Reported by: deivid dot garcia dot garcia at gmail dot com
Summary: array_multisort is chocking when using it's own
constants
Status: Open
Type: Bug
Package: *General Issues
Operating System: Windows 8.1
PHP Version: master-Git-2015-04-25 (snap)
Block user comment: N
Private report: N
New Comment:
I can't reproduce this error. (Ubuntu, current master)
Previous Comments:
------------------------------------------------------------------------
[2015-04-25 14:40:36] deivid dot garcia dot garcia at gmail dot com
Description:
------------
array_multisort is chocking when using it's own constants:
EngineException: Cannot pass parameter 4 by reference in
Drupal\Core\Extension\ExtensionDiscovery->sort() (line 321 of D:\DRUPAL
OFICIAL\drupal\core\lib\Drupal\Core\Extension\ExtensionDiscovery.php).
array_multisort($origins, SORT_ASC, $profiles, SORT_ASC, $all_files);
It get's solved by using variables:
$p = SORT_ASC;
array_multisort($origins, $p, $profiles, $p, $all_files);
Test script:
---------------
<?php
$origins = array();
$profiles = array();
$all_files = array();
array_multisort($origins, SORT_ASC, $profiles, SORT_ASC, $all_files);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69532&edit=1