2014-07-21

Invalid argument supplied for foreach().

Originally Posted By: SvenA
Hi there,

under the menu item Admin [Manage Locales] I get the following script error when I try to edit the language file.

Code: ...
WARNING: Invalid argument supplied for foreach() at line 807 in /var/www/models/locale_model.php
in LocaleModel->updateLocaleSubFolder, line 659 in /var/www/models/locale_model.php
called from LocaleModel->updateLocale, line 611 in /var/www/models/locale_model.php
called from LocaleModel->updateLocales, line 580 in /var/www/models/locale_model.php
called from LocaleModel->extractMergeLocales, line 444 in /var/www/controllers/components/system_component.php
called from SystemComponent->manageLocales, line 411 in /var/www/controllers/controller.php
...


What is the Problem??
'''Originally Posted By: SvenA''' Hi there, <br><br>under the menu item Admin [Manage Locales] I get the following script error when I try to edit the language file.<br><br>Code: ...<br>WARNING: Invalid argument supplied for foreach() at line 807 in /var/www/models/locale_model.php<br> in LocaleModel-&gt;updateLocaleSubFolder, line 659 in /var/www/models/locale_model.php <br> called from LocaleModel-&gt;updateLocale, line 611 in /var/www/models/locale_model.php <br> called from LocaleModel-&gt;updateLocales, line 580 in /var/www/models/locale_model.php <br> called from LocaleModel-&gt;extractMergeLocales, line 444 in /var/www/controllers/components/system_component.php <br> called from SystemComponent-&gt;manageLocales, line 411 in /var/www/controllers/controller.php <br>...<br><br><br>What is the Problem??

-- Invalid argument supplied for foreach()
How did you edit the language file? Did you edit a PHP script or do you mean you were trying to edit strings
and got that message?
How did you edit the language file? Did you edit a PHP script or do you mean you were trying to edit strings<br>and got that message?

-- Invalid argument supplied for foreach()
Originally Posted By: SvenA
When i go on: System Settings -> Manage Locales and i click on locales list Name e.g. English then I get lots of error messages of this type.
in my log files are no entries that indicate an error.
'''Originally Posted By: SvenA''' When i go on: System Settings -&gt; Manage Locales and i click on locales list Name e.g. English then I get lots of error messages of this type.<br>in my log files are no entries that indicate an error.

-- Invalid argument supplied for foreach()
Hey Sven,

Did you ever delete any locales from WORK_DIRECTORY? I need to know more about your set up to understand this error.

Chris
Hey Sven,<br><br>Did you ever delete any locales from WORK_DIRECTORY? I need to know more about your set up to understand this error.<br><br>Chris
2014-07-24

-- Invalid argument supplied for foreach()
As a quick guess looking at the error messages after logging into your system via the info you pm'd
me, it might have something to do with conflicts between how Yioop wants to do curl requests
and the fact you are running PHP in safe mode.
As a quick guess looking at the error messages after logging into your system via the info you pm'd<br>me, it might have something to do with conflicts between how Yioop wants to do curl requests<br>and the fact you are running PHP in safe mode.
X