Skip to content

Commit

Permalink
Merge pull request #2976 from limad/patch-3
Browse files Browse the repository at this point in the history
Update system.class.php
  • Loading branch information
zoic21 authored Nov 12, 2024
2 parents 08b57d5 + 5987134 commit 776aa7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/class/system.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ public static function ps($_find, $_without = null) {
$cmd .= ' | grep -v "' . $value . '"';
}
}
$results = explode("\n", trim(shell_exec($cmd)));
$execCmd = shell_exec($cmd);
if(!$execCmd){
return $return;
}
$results = explode("\n", trim($execCmd));
if (!is_array($results) || count($results) == 0) {
return $return;
}
Expand Down

0 comments on commit 776aa7f

Please sign in to comment.