Skip to content

Commit

Permalink
fix php 8.1 deprecation (json_encode with null)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed Feb 25, 2022
1 parent 06a17ab commit 01ff5c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Ubiquity/controllers/admin/traits/CommandsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ public function _displayHelp($commandName) {
return "<b><span class='ui brown text'>$v</span></b>";
});
$dt->setValueFunction('values', function ($v) {
if ($v == null) {
return '';
}
return "<pre>" . \json_encode($v, (\count($v) > 3) ? JSON_PRETTY_PRINT : null) . "</pre>";
});
$dt->setValueFunction('defaultValue', function ($v) {
Expand Down

0 comments on commit 01ff5c9

Please sign in to comment.