Skip to content

Commit

Permalink
Fixes PHP7.4 deprecated nested ternary operators (#1393)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
sreichel and kiatng committed Jan 17, 2021
1 parent 2a3918c commit 62d9431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Zend/Service/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ protected static function _buildModel()

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

$handlerModel = (object)array(
Expand Down

0 comments on commit 62d9431

Please sign in to comment.