mending Warnings: Cannot use a scalar value as an array

This commit is contained in:
Philip Herbert 2011-12-19 12:40:47 +00:00
parent 34a980ec9b
commit 25ab165898
8 changed files with 13 additions and 2 deletions

View File

@ -1124,4 +1124,5 @@ if (!function_exists('set_cell_attribute_helper'))
}
}
// just in case someone still uses the old var
if (!is_array($GLOBALS['egw_info']['flags']['etemplate'])) $GLOBALS['egw_info']['flags']['etemplate'] = array();
$GLOBALS['egw_info']['flags']['etemplate']['loop'] =& boetemplate::$loop;

View File

@ -187,6 +187,7 @@ class so_sql_cf extends so_sql
),__LINE__,__FILE__,false,'',$this->app) as $row)
{
$entry =& $entries[$row[$this->extra_id]];
if (!is_array($entry)) $entry = array();
$field = $this->get_cf_field($row[$this->extra_key]);
if ($this->allow_multiple_values && $this->is_multiple($row[$this->extra_key]))

View File

@ -362,9 +362,12 @@ class soetemplate
{
for ($col = 0; $col < $cols; ++$col)
{
if (!is_array($this->data[$row])) $this->data[$row]=array();
$this->data[$row][$this->num2chrs($col)] = $this->empty_cell();
}
}
if (!is_array($this->children)) $this->children = array();
if (!is_array($this->children[0])) $this->children[0] = array();
$this->children[0]['type'] = 'grid';
$this->children[0]['data'] = &$this->data;
$this->children[0]['rows'] = &$this->rows;
@ -553,6 +556,7 @@ class soetemplate
$version = (string) $name['version'];
$name = (string) $name['name'];
}
$where = array();
$where[] = 'et_name LIKE '.$this->db->quote($this->sql_wildcards($name).'%');
if ($template != '' && $template != 'default')
{

View File

@ -100,6 +100,7 @@
// trying diiferent ID-ing Method, as getRandomString seems to produce non Random String on certain systems.
$attachmentID = md5(time().serialize($buffer));
//error_log(__METHOD__." add Attachment with ID:".$attachmentID." (md5 of serialized array)");
if (!is_array($this->sessionData['attachments'])) $this->sessionData['attachments']=array();
$this->sessionData['attachments'][$attachmentID] = $buffer;
unset($buffer);
}

View File

@ -610,6 +610,7 @@
if (is_array($sessionData['attachments']) && count($sessionData['attachments']) > 0)
{
$imgClearLeft = common::image('felamimail','clear_left');
$tableRows = array();
foreach((array)$sessionData['attachments'] as $id => $attachment) {
$tempArray = array (
'1' => $attachment['name'], '.1' => 'width="40%"',

View File

@ -311,7 +311,7 @@ abstract class egw_framework
$app = $GLOBALS['egw_info']['flags']['currentapp'];
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
}
$var = array();
if($app!='wiki') $robots ='<meta name="robots" content="none" />';
if (substr($GLOBALS['egw_info']['server']['favicon_file'],0,4) == 'http')
{

View File

@ -151,6 +151,7 @@ class preferences
{
$vals += $this->values;
}
$replace = $with = array();
foreach($vals as $key => $val)
{
if ($this->debug) error_log(__METHOD__." replacing \$\$$key\$\$ with $val ");

View File

@ -600,7 +600,9 @@ class vfs_stream_wrapper implements iface_stream_wrapper
{
return false;
}
$scheme2urls[(string)parse_url($url,PHP_URL_SCHEME)][$path] = $url;
$k=(string)parse_url($url,PHP_URL_SCHEME);
if (!(is_array($scheme2urls[$k]))) $scheme2urls[$k] = array();
$scheme2urls[$k][$path] = $url;
}
$ret = array();
foreach($scheme2urls as $scheme => $urls)