Hi! Nice Shop - but I have the following problem: It seems as the variable names are displayed instead of the variable values!
In the admin area the same.
My server has:
PHP 5.1.6
MySQL 4.1.20
Register globals and magic quotes are off
I had first the database problem too, but deleted then the wrong "$"-sign.
What made I wrong?
Greetings, Whitie
I found a solution in the forum (mentioned by thinkcast):
"I presume you are using php5, the reason you are getting this error is due to the behavior of array_merge() under PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array.
Not to sure if there is a better fix, but I used Type casting to fix the issue, on line 74 of include/language.php change
$this->data = array_merge($this->data, @$_);
to
$this->data = array_merge((array)$this->data, @$_);
As the name implies, all this is effectively doing is casting $this to an array."
Further I corrected the config.php files. The shop front works now, but I have still errors in the admin area:
"Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/httpd/vhosts/p-unlimited.ch/httpdocs/OpenCart/include/language.php on line 74"
And the texts on the buttons are still the variable names.
Whitie
"I presume you are using php5, the reason you are getting this error is due to the behavior of array_merge() under PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array.
Not to sure if there is a better fix, but I used Type casting to fix the issue, on line 74 of include/language.php change
$this->data = array_merge($this->data, @$_);
to
$this->data = array_merge((array)$this->data, @$_);
As the name implies, all this is effectively doing is casting $this to an array."
Further I corrected the config.php files. The shop front works now, but I have still errors in the admin area:
"Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/httpd/vhosts/p-unlimited.ch/httpdocs/OpenCart/include/language.php on line 74"
And the texts on the buttons are still the variable names.
Whitie
Last edited by Whitie on Thu Mar 08, 2007 12:25 am, edited 1 time in total.
FIXED !
in fact line 78 in language.php should be like this
$this->data = array_merge((array)$this->data, (array)@$_);
// $this->data = array_merge($this->data, @$_);
this will solve the variable names not being displayed in both store and admin

in fact line 78 in language.php should be like this
$this->data = array_merge((array)$this->data, (array)@$_);
// $this->data = array_merge($this->data, @$_);
this will solve the variable names not being displayed in both store and admin

Who is online
Users browsing this forum: No registered users and 3 guests