PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

[BUG] call_user_func_array + array_multisort incompatible with PHP5.3(.3) #122

Closed STOWouters closed 10 years ago

STOWouters commented 10 years ago

Just discovered that this line https://github.com/PhileCMS/Phile/blob/master/lib/Phile/Repository/Page.php#L136 is not compatible with PHP5.3.3 on my production server. It complains:

Warning: Parameter 1 to array_multisort() expected to be a reference, value given

It will eventually work if you change the parameters so that they are passed by references, the page will actually load properly, but then the $pages variable will become an empty array. But it won't work for newer PHP versions. It looks like a bug in PHP itself that was fixed in the later versions, maybe we should raise the PHP minimum requirements?

Hadn't this issue on dev server, because it's using PHP5.5.

james2doyle commented 10 years ago

I'm down to raise the minimum. I haven't encountered a hosting situation which didn't have =>5.4 available.

NeoBlack commented 10 years ago

sorry, but 5.3.3 is very old. The last version of PHP 5.3 is 5.3.29 an this version marks the end of life of the PHP 5.3 series. I think we should update our docs and set the minimum requirement to PHP 5.4

here are the announcement to the end of life of PHP 5.3: http://de2.php.net/archive/2014.php#id2014-08-14-1

STOWouters commented 10 years ago

I just read that this has been fixed on 5.3.11, so at least you can set the minimum requirements to 5.3.11.

@NeoBlack Thanks for the info, I'm going to force the hosting service to upgrade it.

NeoBlack commented 10 years ago

@Stijn-Flipper this is a goof idea ;) Since about one year, I fighting with admins to upgrade there servers... @james2doyle what do you think? 5.3.11 or 5.4 as minimum?

james2doyle commented 10 years ago

5.4 and up!

NeoBlack commented 10 years ago

I have changed the minimum requirement to 5.4.0 in pull request #123

STOWouters commented 10 years ago

@Stijn-Flipper this is a goof idea ;) Since about one year, I fighting with admins to upgrade there servers...

Not with my hosting service, they already upgraded it 5 minutes later :+1: I just asked for it politely :)