Skip to content

Commit

Permalink
Php 8.1 - passing null to version_compare is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Apr 13, 2022
1 parent 0bed8e4 commit 78ee078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ui/Component/Listing/Columns/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ protected function prepareItem(array $item)
return __('N/A');
}

$currentVersion = $item[$this->getData('name')];
$latestVersion = $item[$this->getData('config/compareWith')];
$currentVersion = $item[$this->getData('name')] ?: '';
$latestVersion = $item[$this->getData('config/compareWith')] ?: '';
$result = version_compare($currentVersion, $latestVersion, '>=');
if ($result) {
$severity = 'grid-severity-notice';
Expand Down

1 comment on commit 78ee078

@ci-swissuplabs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify your commit as it didn't pass some tests

Please sign in to comment.