Etemplate - Fix some Scrutinizer warnings

This commit is contained in:
nathangray 2019-03-20 14:37:39 -06:00
parent 0f0ef66bf1
commit 7f6088490a

View File

@ -343,7 +343,7 @@ class Select extends Etemplate\Widget
self::$request->sel_options[$form_name] = array_merge(self::$request->sel_options[$form_name], $type_options); self::$request->sel_options[$form_name] = array_merge(self::$request->sel_options[$form_name], $type_options);
// if no_lang was modified, forward modification to the client // if no_lang was modified, forward modification to the client
if ($no_lang != $this->attr['no_lang']) if ($no_lang != $this->attrs['no_lang'])
{ {
self::setElementAttribute($form_name, 'no_lang', $no_lang); self::setElementAttribute($form_name, 'no_lang', $no_lang);
} }
@ -834,11 +834,9 @@ class Select extends Etemplate\Widget
{ {
$apps = array(); $apps = array();
$parts = explode(":", $type2); $parts = explode(":", $type2);
if (is_array($parts)) $exceptions = explode(";", $parts[1]);
{ $type2 = $parts[0];
$exceptions = explode(";", $parts[1]);
$type2 = $parts[0];
}
foreach ($GLOBALS['egw_info']['apps'] as $app => $data) foreach ($GLOBALS['egw_info']['apps'] as $app => $data)
{ {
if ($type2 == 'enabled' && (!$data['enabled'] || !$data['status'] || $data['status'] == 3 || in_array($app, $exceptions))) if ($type2 == 'enabled' && (!$data['enabled'] || !$data['status'] || $data['status'] == 3 || in_array($app, $exceptions)))
@ -897,6 +895,7 @@ class Select extends Etemplate\Widget
{ {
$longnames = 1; $longnames = 1;
} }
$info = '';
switch ($longnames) switch ($longnames)
{ {
case 2: case 2: