logo
WSN Links PHP Directory Software
Features Showcase Reviews Demos Purchase Manual Support
 

Warning: Variable passed to each()...

Version:


Warning: Variable passed to each()...
jwalling
Beginner

Usergroup: Customer
Joined: Jul 21, 2003
Total Topics: 2
Total Posts: 3
Posted 09/21/04 - 01:22 PM:
quote post
#1
13:09 9/21/2004

I am using WSN ver 2.56.

I have a variant of the problem in post 2862.

When I browse with IE 6.0 - there is NO PROBLEM.

When I browse with Firefox 0.8, I get the error message repeated 3 times at the top of each page:

Warning: Variable passed to each() is not an array or object in /home/jwalling/public_html/wsnlinks_nz/commonfuncs.php on line 1125

Which maps to this function:
function langreplacements($template)
{
global $origlang;
$language = $origlang;
$langarray = get_object_vars($language);
while(list($key, $value) = each($langarray))
{
$setvar = '{LANG_'. strtoupper($key) .'}';
$template = str_replace($setvar, $value, $template);
$setvar = '{U_LANG_'. strtoupper($key) .'}';
$template = str_replace($setvar, strtoupper($value), $template);
$setvar = '{L_LANG_'. strtoupper($listarray[$count]) .'}';
$template = str_replace($setvar, strtolower($value), $template);
$setvar = '{P_LANG_'. strtoupper($key) .'}';
$template = str_replace($setvar, ucfirst($value), $template);
$setvar = '{PALL_LANG_'. strtoupper($key) .'}';
$template = str_replace($setvar, ucwords($value), $template);
}
return $template;
}

A language variable is in conflict. Where do I go to fix it?

Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5786
Posted 09/21/04 - 10:43 PM:
quote post
#2
Where in the world is post #2862? Edit: Ah, that's the thread number of this thread. All the post numbers are in the 12,000s.

If it depends on the browser, it has to be a cookie. I think 2.56 may have used language as a variable submitted in a form somewhere (maybe the language selector?), and that getting set in turn as a cookie. Check your templates for 'language'.

Edited by Paul on 09/21/04 - 10:47 PM
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

Admin Control Panel

   
Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support
© 2008 Paul Knierim. All rights reserved.