do not access $data if there is none

This commit is contained in:
Uwe Steinmann 2019-06-27 14:18:39 +02:00
parent e8c9fd5e4e
commit cf6b852233

View File

@ -41,13 +41,14 @@ $type = 'docsperuser';
if(!empty($_GET['type'])) {
$type = $_GET['type'];
}
$data = $dms->getStatisticalData($type);
switch($type) {
case 'docsperstatus':
foreach($data as &$rec) {
$rec['key'] = getOverallStatusText((int) $rec['key']);
}
break;
if($data = $dms->getStatisticalData($type)) {
switch($type) {
case 'docsperstatus':
foreach($data as &$rec) {
$rec['key'] = getOverallStatusText((int) $rec['key']);
}
break;
}
}
if($view) {