Unexpected T_FUNCTION error (v. 2.9)
Parse error: syntax error, unexpected T_FUNCTION in /home/yoursite/public_html/stconfig.php on line 924
It means that the integrated function used to sort the additional links (new items, featured items, sale items and all items) is not being recognized by the server. This will not happen on all servers, so if you do not see this error, your server will view that function correctly and you do not need this update. For compatibility purposes, we'll change this on all future version 2.9x systems. For now, you can fix the beta as follows:
-
Open the stconfig.php file (in the main folder of the site)
-
Change the code:
if (!empty($extralinks['before'])) { $beforelinks = array_filter(array_merge(array_flip($prodlinkorder), $extralinks['before']), function($arraytofilter) { return !is_numeric($arraytofilter); }); $extrabefore = (!empty($beforelinks)) ? implode(" ", $beforelinks) : ""; }to:
if (!empty($extralinks['before'])) $extrabefore = implode(" ", array_filter($extralinks['before'])); -
Change the code:
if (!empty($extralinks['after'])) { $afterlinks = array_filter(array_merge(array_flip($prodlinkorder), $extralinks['after']), function($arraytofilter) { return !is_numeric($arraytofilter); }); $extraafter = (!empty($afterlinks)) ? implode(" ", $afterlinks) : ""; }to:
if (!empty($extralinks['after'])) $extraafter = implode(" ", array_filter($extralinks['after'])); -
Save and reload the file.