Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Pandos on May 15th, 2014, 11:59 AM

Title: [Install] Error 500
Post by: Pandos on May 15th, 2014, 11:59 AM
Index will give a error 500 while trying to do a fresh install.
Quote
PHP Fatal error:  Can't use function return value in write context in /gz/app/Subs.php on line 2
Title: Re: [Install] Error 500
Post by: Nao on May 15th, 2014, 11:44 PM
Reinstalled this week, had no such problem..?
Title: Re: [Install] Error 500
Post by: Leftie on May 15th, 2014, 11:54 PM
I'm not getting quite the same error, so it should perhaps go in another thread, but I simply uploaded the newest revision files (29fdcaa) via FTP, and now I'm getting the following error, trying to view the main page:

Code: [Select]
Fatal error: Can't use function return value in write context in <redacted>/gz/app/Subs.php on line 2344

Which refers to the middle of these three lines:

Code: [Select]
// Remove the home separator if not needed.
if (empty(reset($menu_items['home']['items'])))
array_shift($menu_items['home']['items']);

I'm using the "Wireless" skin, if that's important.
Title: Re: [Install] Error 500
Post by: Nao on May 15th, 2014, 11:58 PM
Oh, right.
That's because I'm using PHP 5.5 both here (IIRC) and locally, and empty() doesn't support function results before that.
Title: Re: [Install] Error 500
Post by: Pandos on May 16th, 2014, 08:08 AM
Seems to be fixed.
But there are some errors remaining in the logs:
Quote
/viewremote/?filename=current-version.js
2: array_merge(): Argument #2 is not an array
Datei:/wedge/gz/app/Subs-Template.php
Zeile: 406
Also the same error for latest-news.js and search. :)
Title: Re: [Install] Error 500
Post by: Nao on May 17th, 2014, 05:57 PM
Okay, what's in your page_replacements setting..?
This is the thing you can fill up in the Pretty URLs admin page... But I'm more interested in the raw data in the settings table, than what the PURLs page tells you.
(It's probably an unserialize error.)

BTW, replacing lines 405 and 406 with this should work...
Code: [Select]
if (!empty($settings['page_replacements']) && ($extra_pr = unserialize($settings['page_replacements'])) !== false)
$pr = array_merge($pr, $extra_pr);
Title: Re: [Install] Error 500
Post by: Pandos on May 19th, 2014, 01:38 PM
Your latest commit [bcd3d00] fixed this.
Great work!