From 282c30fc23e881f7b88f025021e84561631ff715 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Wed, 10 May 2017 11:34:42 +0200 Subject: [PATCH] Stringify output --- runnow.php | 5 +++-- webcron.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runnow.php b/runnow.php index 08ea59b..dba85a7 100644 --- a/runnow.php +++ b/runnow.php @@ -52,8 +52,9 @@ if (filter_var($result["url"], FILTER_VALIDATE_URL)) { if($result["url"] != "reboot") { $body = ''; - $result = 0; - exec($result["url"], $body, $result); + $statuscode = 0; + exec($result["url"], $body, $statuscode); + $body = implode("\n", $body); } else { $rebootjobs[] = $result['jobID']; touch("cache/reboot.trigger"); diff --git a/webcron.php b/webcron.php index 80f073c..0a362e2 100644 --- a/webcron.php +++ b/webcron.php @@ -77,8 +77,9 @@ foreach ($results as $result) { if($result["url"] != "reboot") { $body = ''; - $result = 0; - exec($result["url"], $body, $result); + $statuscode = 0; + exec($result["url"], $body, $statuscode); + $body = implode("\n", $body); } else { $rebootjobs[] = $result['jobID']; touch("cache/reboot.trigger");