fix: suppress exec/shell_exec warnings and guard null references

DaemonTrait: added @ to shell_exec calls that may fail on restricted
systems (e.g. when /proc is unavailable).

ProcessManager::isNginxRunning(): suppressed exec warning when pgrep
is not available.

Database::query(): guarded explode on debugString output to prevent
undefined offset when Sent SQL section is missing.

UpdateCronJob: added null check for $gitRelease to prevent fatal error
when GitHubReleases service fails to initialize.
This commit is contained in:
Divarion-D
2026-03-15 12:23:08 +03:00
parent cf70d1c495
commit 4cf4c3a82d
4 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -475,7 +475,7 @@ class ProcessManager {
*/
public static function isNginxRunning() {
$rOutput = [];
exec('pgrep -u xc_vm -a 2>/dev/null', $rOutput);
@exec('pgrep -u xc_vm -a 2>/dev/null', $rOutput);
foreach ($rOutput as $rProcess) {
if (preg_match('/nginx:\s+master/', $rProcess)) {
return true;