[PHP] Warning: Invalid argument supplied for foreach() xxxxx.php on line 113
Ik krijg uit het niets opeens een php error. Nou weet ik dat dit verband heeft met array's maar ik begrijp niet waar het probleem ligt. Als ik naar regel 113 ga kijken zie ik ook niets bijzonders op het eerste hoog. Ik dacht dat deze error met array's te maken had.
Deze code is te vinden rond regel 113:
Ik krijg uit het niets opeens een php error. Nou weet ik dat dit verband heeft met array's maar ik begrijp niet waar het probleem ligt. Als ik naar regel 113 ga kijken zie ik ook niets bijzonders op het eerste hoog. Ik dacht dat deze error met array's te maken had.
Deze code is te vinden rond regel 113:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| // Functies uitvoeren foreach ($sql_create['function'] as $function) { if (function_exists($function['name'])) { // Variabelen verzamelen $vars = array(); foreach ($function['parameter'] as $parameter) { $vars[] = $parameter['prefix'] . ($parameter['field'] != '' ? (isset($row[$parameter['field']]) ? $row[$parameter['field']] : '') : '') . $parameter['suffix']; } $output = call_user_func_array($function['name'], $vars); if ($function['output'] != '') $row[$function['output']] = $output; } else { // Functie bestaat niet, uitvoeren stopzetten die(fatal_error('fuction <strong>' . $function['name'] . '</strong> does not exist, ' . 'but is requested by xml-source ' . $item['name'])); } } $design_block = $setup['design'][urlencode($item['design'])]['xml']; if (count($rows) > 0) { // HTML invullen if ($item['replace'] != '') { $design_block = fill_with_key($row, $design_block, '%', '%'); $design_block = fill_with_key(array_map('xml_htmlentities', $row), $design_block, '{', '}'); $design_block = fill_with_key(array_map('addslashes', $row), $design_block, '\'', '\''); $design .= ($design != '' ? $setup['design'][urlencode($item['glue'])]['xml'] : '') . $design_block; } // Volgende item opzoeken $count ++; if (!isset($rows[$count])) $continue = false; } else { // Na weergeven stoppen met uitvoeren $design = $design_block; $continue = false; } |
[ Voor 0% gewijzigd door BtM909 op 07-01-2010 16:14 ]
Facts don't care about your feelings