Hi,
Has anyone had any trouble running this on a PHP5 instalation?
When I tried to access the admin area, I got this message "Fatal error: Only variables can be passed by reference in c:\wamp\www\petfriendlyrentals\lib\classes\class.admintheme.inc.php on line 143"
I'm by no means a PHP guru but I heard some of the Object Orientated code syntax has changed from PHP 4 to 5 and I'm wondering if that could be the problem?
My server configuration is below:
Apache version : Apache/1.3.33 (Win32)
PHP version : 5.1.0RC1
MySQL version : 4.1.13a-nt - extension : mysqli
Error - Fatal error: Only variables can be passed by reference
-
Akrabat
Re: Error - Fatal error: Only variables can be passed by reference
That's a "feature" of 5.1 IIRC. It caused because array_pop takes a reference to an array and passing the results of an explode() directly results in a temporary var to be created that cannot be used as a reference.
Change line 143 of lib/classes/class.admintheme.inc.php
from
to
and let me know if that solves the problem.
Change line 143 of lib/classes/class.admintheme.inc.php
from
Code: Select all
$this->script = array_pop(explode('/',$this->url));
Code: Select all
$tmp = explode('/',$this->url);
$this->script = array_pop($tmp);
-
Tux!
Re: Error - Fatal error: Only variables can be passed by reference
YES!! that change resolve the problemmm..
thx a lot!!!
Besitos!! xD
thx a lot!!!
Besitos!! xD
