Issue with foreach() if no languages exist
-
Hey, here’s a bugfix for you. On line 94 of ~/view/admin/language.php, you have the following:
foreach ($options['language'] as $key => $value) {
However, if $options[‘language’] is undefined (ie: if you have no languages installed), you will get an error about an invalid foreach() argument. This is on a fresh install of xLanguage on WordPress 2.3.3. Adding the following line:
Above the foreach(), with a corrosponding closing bracket on line 117 below the closing of the foreach will fix this issue. I’ve tested this on my install of WordPress and it works fine.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Issue with foreach() if no languages exist’ is closed to new replies.