From ab37be5fbacb1fe01d696a6beb2409588102ffa6 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 8 Aug 2008 09:26:36 +0000 Subject: [PATCH] fix for php warning empty haystack ... in line 967 --- etemplate/inc/class.uietemplate.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 1ffa7a6d1e..e7a44bf1ce 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -964,7 +964,7 @@ class etemplate extends boetemplate $options = ''; if ($readonly = $cell['readonly'] && $readonlys[$name] !== false || // allow to overwrite readonly settings of a cell @$readonlys[$name] && !is_array($readonlys[$name]) || $readonlys['__ALL__'] || - is_string($name) && ($p = strrpos($name,'[')) !== false && ($parent=substr($name,0,$p)) && $readonlys[$parent]) // allow also set parent readonly (instead each child) + !empty($name) && is_string($name) && ($p = strrpos($name,'[')) !== false && ($parent=substr($name,0,$p)) && $readonlys[$parent]) // allow also set parent readonly (instead each child) { $options .= ' readonly="readonly"'; }