Post by Whitie » Wed Jan 31, 2007 10:41 pm

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
Last edited by Whitie on Thu Mar 08, 2007 12:25 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Jan 31, 2007 10:34 pm

Post by Whitie » Fri Feb 02, 2007 5:02 am

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
Last edited by Whitie on Thu Mar 08, 2007 12:25 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Jan 31, 2007 10:34 pm

Post by stealth » Wed Feb 28, 2007 7:56 am

Where you able to sovle this issue?
I have the same problem.
What did you fix in the config file?
(half of the admin interface is showing variable names)

Newbie

Posts

Joined
Wed Feb 28, 2007 7:50 am

Post by stealth » Wed Feb 28, 2007 11:18 am

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
:)

Newbie

Posts

Joined
Wed Feb 28, 2007 7:50 am

Post by Whitie » Thu Mar 08, 2007 12:25 am

In fact! Now, also the admin area is displayed correctly.

Thank you very much!

Greetings,
Whitie

Newbie

Posts

Joined
Wed Jan 31, 2007 10:34 pm
Who is online

Users browsing this forum: No registered users and 2 guests