diff --git a/src/index.php b/src/index.php index 06e4156..b6ec9c5 100644 --- a/src/index.php +++ b/src/index.php @@ -27,6 +27,9 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { $jobId = microtime(1) . "_" . uniqid(); #file_put_contents() $queueDir = __DIR__ . "/../queue"; + if(!is_dir($queueDir)){ + mkdir($queueDir,0777,true); + } $queueDir = realpath($queueDir); $queueFile = $queueDir . "/" . $jobId . ".json"; file_put_contents($queueFile, json_encode($tags)); @@ -96,7 +99,7 @@ EOT; } $err = ""; -switch ($_GET["err"]) { +switch ($_GET["err"]??"") { case "notags": $err = "Please provide at least one tag"; break; @@ -111,9 +114,9 @@ switch ($_GET["err"]) {