4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: idijotaz on September 17, 2006, 08:41:38 PM

Title: Problem in CP
Post by: idijotaz on September 17, 2006, 08:41:38 PM
When i load member.php file (control panel) im getting error at top. Im getting that error after transfered my site to other hosting
Code: [Select]
Warning: Invalid argument supplied for foreach() in /mounted-storage/home28b/sub003/sc25579-ZTFF/funnylive.net/includes/functions.php on line 1444
in that line:
Code: [Select]
foreach ($val[3] as $item) {
Title: Re: Problem in CP
Post by: V@no on September 17, 2006, 10:02:23 PM
10 lines above and below that line please.
Title: Re: Problem in CP
Post by: infectedin on September 17, 2006, 10:33:59 PM
Code: [Select]
//--- DB Field Dropdown ---
function get_db_fields_dropdown($key, $val, $value) {
$dropdown = "<SELECT name=\"".$key."\" onkeypress=\"if(window.event.keyCode==13)this.form.submit();\" class=\"select\">";
$i = 0;
foreach ($val[3] as $item) {
  $what = ($val[4]) ? $item : $i;
$dropdown .= "<option value=\"".$what."\"".(($value == $what) ? " selected" : "").">".$item."</option>\n";
$i++;
}
$dropdown .= "</select>\n";
  return $dropdown;
}
//--- End DB Field Dropdown ---
Title: Re: Problem in CP
Post by: idijotaz on September 26, 2006, 03:49:45 PM
so any idead? infectedin wrote that lines
Title: Re: Problem in CP
Post by: V@no on September 27, 2006, 02:25:49 AM
check your db_field_definitions.php
whatever field is using dropdown type, does not provide the array with the items for the dropdown.