Topic: Invalid argument supplied for foreach() in file:
When I Open Page I saw That
Invalid argument supplied for foreach() in file: /home/choudh1/domains/choudharyenterprises.tk/public_html/includes/session.inc at line 342
Give Solutin Please
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → Report Bugs here → Invalid argument supplied for foreach() in file:
When I Open Page I saw That
Invalid argument supplied for foreach() in file: /home/choudh1/domains/choudharyenterprises.tk/public_html/includes/session.inc at line 342
Give Solutin Please
You are right rajbirdhaka. Although the bug is quite harmless, it will be fixed to next minor. The bug shows up when starting up FA, but only if you have specific warnings enabled.
/Joe
Hi Joe, expect that this issue has been solved in the latest Mercurial 3122 in session.inc
No, this is because of a missing include file ...../installed_extensions.php. It only appears when starting up. The include file is coming later in session.inc. It is totally harmless, however do not look nice.
Janusz is going to fix this asap.
/Joe
Thanks Joe, maybe an "@" should do it!.
If the file installed_extensions.php does not exist, why not hard code it's content into the script? And if the content needs to be written and saved and the file is still missing, then it can be created!
Alternatively, just create it if it is missing - with some acceptable default content - and then read it back into the current script!
The installed_extensions.php file is properly created during installation. Nevertheless I have found small bug in system tests (main FA folder was not tested properly whether it is writable or not). Fixed for next release.
Janusz
Yes, the function check_write() in includes/main.inc should cover the lang folder check as well.
In install/index.php mustn't there be a check to see if lang folder is writeable?
if (!file_exists($path_to_root . "/lang/installed_languages.inc")) {
$installed_languages = array (
0 => array ('code' => 'C', 'name' => 'English', 'encoding' => 'iso-8859-1'));
$dflt_lang = 'C';
write_lang();
}
The lang folder check is included in system_test.inc, and result is displayed on leading installer page.
Janusz
Oh yes, thanks. Lines 238-240 in system_tests.inc do it:
$fname = $path_to_root.'/lang';
$test['test'] = $fname;
if (!(is_dir($fname) && is_writable($fname))) {
FrontAccounting forum → Report Bugs here → Invalid argument supplied for foreach() in file:
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.