From 43d2411ba1e49aab4cef0bf7bbbc245546eb4de8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2010 08:26:41 +0000 Subject: [PATCH] fixing some warnings --- etemplate/inc/class.etemplate.inc.php | 4 ++-- etemplate/inc/class.solangfile.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index d4b77d1cba..211664f9d8 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -1601,7 +1601,7 @@ class etemplate extends boetemplate break; case 'image': // size: [link],[link_target],[imagemap],[link_popup],[id] $image = $value != '' ? $value : $name; - if (!is_array($image)) list($app,$img) = explode('/',$image,2); + if (is_string($image)) list($app,$img) = explode('/',$image,2); if (!$app || !$img || !is_dir(EGW_SERVER_ROOT.'/'.$app) || strpos($img,'/')!==false) { $img = $image; @@ -2136,7 +2136,7 @@ class etemplate extends boetemplate $value = ''; // blur-values is equal to emtpy } //echo "

process_show($this->name) loop was ".self::$loop.", $type: $form_name = ".array2string($value)."

\n"; - list($type,$sub) = explode('-',$type); + if (is_string($type)) list($type,$sub) = explode('-',$type); switch ($type) { case 'ext': diff --git a/etemplate/inc/class.solangfile.inc.php b/etemplate/inc/class.solangfile.inc.php index 19020c46a7..8c39c4b01f 100644 --- a/etemplate/inc/class.solangfile.inc.php +++ b/etemplate/inc/class.solangfile.inc.php @@ -186,7 +186,7 @@ class solangfile { $reg_expr = '/('.implode('|',array_keys($this->functions)).")[ \t]*\([ \t]*(.*)$/i"; define('SEP',filesystem_separator()); - $d=dir($fd); + if (!($d=dir($fd))) return; while ($fn=$d->read()) { if (@is_dir($fd.$fn.SEP))