moglia
2010-10-13 a55e8eadd81541a4fee9ace437b07a32d659a6f5
Handling For: Warning: Invalid argument supplied for foreach() on lines 54, 141 and 178. - Empty Arg Array.
1 files modified
8 ■■■■ changed files
interface/lib/classes/listform.inc.php 8 ●●●● patch | view | raw | blame | history
interface/lib/classes/listform.inc.php
@@ -51,9 +51,11 @@
        $this->module = $module;
        
        //* Fill datasources
        if(@is_array($this->listDef['item'])) {
        foreach($this->listDef['item'] as $key => $field) {
            if(@is_array($field['datasource'])) {
                $this->listDef['item'][$key]['value'] = $this->getDatasourceData($field);
                }
            }
        }
        
@@ -136,6 +138,7 @@
        }
        //* store retrieval query
        if(@is_array($this->listDef['item'])) {
        foreach($this->listDef['item'] as $i) {
            $field = $i['field'];
@@ -171,8 +174,9 @@
                }
            }
        }
        }
        //* Store variables in object | $this->searchValues = $_SESSION["search"][$list_name];
        if(@is_array($this->listDef['item'])) {
        foreach($this->listDef['item'] as $i) {
            $field = $i['field'];
            // if($_REQUEST[$search_prefix.$field] != '') $sql_where .= " $field ".$i["op"]." '".$i["prefix"].$_REQUEST[$search_prefix.$field].$i["suffix"]."' and";
@@ -180,7 +184,7 @@
                $sql_where .= " $field ".$i['op']." '".$i['prefix'].$_SESSION['search'][$list_name][$search_prefix.$field].$i['suffix']."' and";
            }
        }
        }
        return ( $sql_where != '' ) ? $sql_where = substr($sql_where,0,-3) : '1';
    }