Fix PHP 8.0 Fatal error: Unparenthesized a ? b : c ?: d is not supported

This commit is contained in:
Ralf Becker 2021-03-21 21:46:10 +01:00
parent ab9c089f70
commit 84845d05b5
3 changed files with 4 additions and 4 deletions

View File

@ -392,8 +392,8 @@ class Sharing
echo $message; echo $message;
$class = strpos($status, '404') === 0 ? 'EGroupware\Api\Exception\NotFound' : $class = strpos($status, '404') === 0 ? 'EGroupware\Api\Exception\NotFound' :
strpos($status, '401') === 0 ? 'EGroupware\Api\Exception\NoPermission' : (strpos($status, '401') === 0 ? 'EGroupware\Api\Exception\NoPermission' :
'EGroupware\Api\Exception'; 'EGroupware\Api\Exception');
throw new $class($message, $status); throw new $class($message, $status);
} }

View File

@ -1368,7 +1368,7 @@ class infolog_ui
} }
$app = Api\Json\Push::onlyFallback() || $all_selected ? 'infolog' : 'msg-only-push-refresh'; $app = Api\Json\Push::onlyFallback() || $all_selected ? 'infolog' : 'msg-only-push-refresh';
Api\Json\Response::get()->call('egw.refresh', $msg, $app, $selected[0], $all_selected || count($selected) > 1 ? null : Api\Json\Response::get()->call('egw.refresh', $msg, $app, $selected[0], $all_selected || count($selected) > 1 ? null :
$action === 'delete' ? 'delete' : 'edit', $app, null, null, $failed ? 'error' : 'success'); ($action === 'delete' ? 'delete' : 'edit'), $app, null, null, $failed ? 'error' : 'success');
} }
/** /**

View File

@ -1142,7 +1142,7 @@ class timesheet_ui extends timesheet_bo
} }
$app = Api\Json\Push::onlyFallback() || $all_selected ? 'timesheet' : 'msg-only-push-refresh'; $app = Api\Json\Push::onlyFallback() || $all_selected ? 'timesheet' : 'msg-only-push-refresh';
Api\Json\Response::get()->call('egw.refresh', $msg, $app, $selected[0], $all_selected || count($selected) > 1 ? null : Api\Json\Response::get()->call('egw.refresh', $msg, $app, $selected[0], $all_selected || count($selected) > 1 ? null :
$action === 'delete' ? 'delete' : 'update', $app, null, null, $failed ? 'error' : 'success'); ($action === 'delete' ? 'delete' : 'update'), $app, null, null, $failed ? 'error' : 'success');
} }
/** /**