mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-01 20:02:11 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user