Skip to content

Commit 62d9431

Browse files
sreichelkiatng
andauthored
Fixes PHP7.4 deprecated nested ternary operators (OpenMage#1393)
* Fixes PHP7.4 deprecated nested ternary operators * Update lib/Zend/Service/Console/Command.php Co-authored-by: Ng Kiat Siong <[email protected]> Co-authored-by: Ng Kiat Siong <[email protected]>
1 parent 2a3918c commit 62d9431

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Zend/Service/Console/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ protected static function _buildModel()
220220

221221
for ($hi = 0; $hi < count($handlers); $hi++) {
222222
$handler = $handlers[$hi];
223-
$handlerDescription = isset($handlerDescriptions[$hi]) ? $handlerDescriptions[$hi] : isset($handlerDescriptions[0]) ? $handlerDescriptions[0] : '';
224-
$handlerDescription = str_replace('\r\n', "\r\n", $handlerDescription);
223+
$handlerDescription = $handlerDescriptions[$hi] ?? $handlerDescriptions[0] ?? '';
224+
$handlerDescription = str_replace('\r\n', "\r\n", $handlerDescription);
225225
$handlerDescription = str_replace('\n', "\n", $handlerDescription);
226226

227227
$handlerModel = (object)array(

0 commit comments

Comments
 (0)