?
Referenced as Pull Request for: # 10943
avatar infograf768
infograf768
27 Jun 2016

I was using php 5.4.4 when I got this error:

( ! ) Fatal error: Call to undefined function array_column() in /Applications/MAMP/htdocs/testwindows/trunkgitnew/plugins/system/redirect/redirect.php on line 170

When testing the PR #10932

@mbabker suggested I create this issue.

#10932 (comment)

avatar infograf768 infograf768 - open - 27 Jun 2016
avatar brianteeman
brianteeman - comment - 27 Jun 2016

Looks like this was added here #10670


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10942.

avatar brianteeman brianteeman - change - 27 Jun 2016
Labels Added: ?
avatar infograf768
infograf768 - comment - 27 Jun 2016

Looks like we have a solution here:
https://github.com/ramsey/array_column

avatar wojsmol
wojsmol - comment - 27 Jun 2016
avatar rdeutz
rdeutz - comment - 27 Jun 2016

we shouldn't add a package only because of one use of this function

avatar rdeutz rdeutz - reference | 952ead2 - 27 Jun 16
avatar rdeutz
rdeutz - comment - 27 Jun 2016

I will make a patch

avatar mbabker
mbabker - comment - 27 Jun 2016

@rdeutz FWIW when the joomla/registry package gets updated again the symfony/polyfill-php55 package will get pulled in as a dependency of it because I changed the JSON format object's stringToObject() method to throw an Exception on a json_decode() error and use json_last_error_msg() to get the message (function added in PHP 5.5). So the polyfill will inherently be pulled into the CMS at some point.

avatar rdeutz
rdeutz - comment - 27 Jun 2016

@mbabker yeah might be, but pulling a new package in while in beta just to not code 5 lines of PHP code seems not right

PR #10943

avatar brianteeman
brianteeman - comment - 27 Jun 2016

Closed as we have a PR #10943


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10942.

avatar wilsonge wilsonge - close - 27 Jun 2016
avatar brianteeman brianteeman - close - 27 Jun 2016
avatar brianteeman brianteeman - close - 27 Jun 2016
avatar brianteeman brianteeman - close - 27 Jun 2016
avatar brianteeman brianteeman - change - 27 Jun 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-06-27 13:33:31
Closed_By brianteeman
avatar bertmert
bertmert - comment - 27 Jun 2016

There's already an API function doing the same like array_column:
ArrayHelper::getColumn($redirects, 'old_url')

avatar wilsonge wilsonge - change - 7 Sep 2016
Labels Removed: ?
avatar brianteeman brianteeman - change - 7 Sep 2016
Labels Added: ?

Add a Comment

Login with GitHub to post a comment