No warnings on CLI anymore
authorChristian Weiske <cweiske@cweiske.de>
Thu, 8 Feb 2018 21:25:28 +0000 (22:25 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 8 Feb 2018 21:25:28 +0000 (22:25 +0100)
www/functions.php

index f6b5b1d..2d4e515 100644 (file)
@@ -112,7 +112,9 @@ function playVideoOnDreambox($videoUrl, $dreamboxHost)
     );
     $ret = file_get_contents($playUrl, false, $ctx);
     if ($ret !== false) {
-        header('HTTP/1.0 200 OK');
+        if (php_sapi_name() != 'cli') {
+            header('HTTP/1.0 200 OK');
+        }
         echo "Video play request sent to dreambox\n";
         exit(0);
     } else {