Skip to content

Commit

Permalink
Merge pull request #2701 from pifou25/fix/deprecated_notices
Browse files Browse the repository at this point in the history
fix: deprecated and warning notices
  • Loading branch information
zoic21 authored Jun 24, 2024
2 parents 51ad668 + 3e7a4f0 commit 8bd42ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/class/cron.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ public function setDeamonSleepTime($_deamonSleepTime) {
}

public function getOption() {
return json_decode($this->option, true);
return json_decode($this->option ?? '', true);
}

public function getOnce($_default = 0) {
Expand Down
2 changes: 1 addition & 1 deletion core/class/system.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function getDistrib() {
return 'custom';
}
if (self::$_distrib === null) {
self::$_distrib = trim(shell_exec('grep CPE_NAME /etc/os-release | cut -d \'"\' -f 2 | cut -d : -f 3 '));
self::$_distrib = trim(shell_exec('grep CPE_NAME /etc/os-release | cut -d \'"\' -f 2 | cut -d : -f 3 ') ?? '');
if (self::$_distrib == '') {
self::$_distrib = trim(shell_exec('grep -e "^ID" /etc/os-release | cut -d \'=\' -f 2'));
}
Expand Down
2 changes: 1 addition & 1 deletion core/class/utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static function getJsonAttr(&$_attr, $_key = '', $_default = '') {
if ($_key == '') {
return is_json($_attr, array());
}
if ($_attr === '') {
if (empty($_attr)) {
if (is_array($_key)) {
foreach ($_key as $key) {
$return[$key] = $_default;
Expand Down

0 comments on commit 8bd42ce

Please sign in to comment.