small bugfix for a bug/phpwarning (empty haystack...) appearing occasionally while building up templates

This commit is contained in:
Klaus Leithoff 2008-02-14 07:40:16 +00:00
parent 54e606e2a0
commit ee3377d1f2

View File

@ -1329,9 +1329,11 @@ foreach($sess as $key => $val)
if (!$readonly && $type != 'buttononly') // input button, are never submitted back! if (!$readonly && $type != 'buttononly') // input button, are never submitted back!
{ {
$GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = $cell['type']; $GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
if ($name == 'cancel' || stripos($name,'[cancel]') !== false) if (strlen($name>0) {
{ if ($name == 'cancel' || stripos($name,'[cancel]') !== false)
$GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = 'cancel'; {
$GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = 'cancel';
}
} }
} }
break; break;