THT Community
Fatal error: Call-time pass-by-reference has been removed - Printable Version

+- THT Community (https://thehostingtool.com/forum)
+-- Forum: THT Support (https://thehostingtool.com/forum/forum-7.html)
+--- Forum: THT General Support (https://thehostingtool.com/forum/forum-8.html)
+--- Thread: Fatal error: Call-time pass-by-reference has been removed (/thread-2221.html)



Fatal error: Call-time pass-by-reference has been removed - Post2HostME - 01-19-2013

Hello,

Just installed and trying to go to the admin panel I receive the error

Fatal error: Call-time pass-by-reference has been removed in /home/xxxxxxx/public_html/admin/pages/home.php on line 97


RE: Fatal error: Call-time pass-by-reference has been removed - Liam D. - 01-20-2013

What PHP version are you using? 5.3 or 5.4? AFAIK THT hasn't been tested on a 5.4 setup yet.


RE: Fatal error: Call-time pass-by-reference has been removed - Kevin - 01-20-2013

PHP is now primarily tested on 5.3 but I'm pretty certain it'll work just fine on 5.2 too. 5.4 brought about some code-breaking changes.

To fix this specific issue you can replace
PHP Code:
preg_match_all('/(<(?:a|img) (?:href|src)=(?:"|\'))([-A-Z0-9+&@#\/%?=~_|!:,.;]*[A-Z0-9+&@#\/%=~_|])((?:"|\')[a-z0-9]*[^<>]*\/?>)/si'$item['summary'], &$matchesPREG_SET_ORDER); 
with
PHP Code:
preg_match_all('/(<(?:a|img) (?:href|src)=(?:"|\'))([-A-Z0-9+&@#\/%?=~_|!:,.;]*[A-Z0-9+&@#\/%=~_|])((?:"|\')[a-z0-9]*[^<>]*\/?>)/si'$item['summary'], $matchesPREG_SET_ORDER);