]> git.p6c8.net - jirafeau.git/commitdiff
prevent api exec in case of problem
authorJerome Jutteau <mojo@couak.net>
Wed, 5 Jun 2013 15:47:03 +0000 (15:47 +0000)
committerJerome Jutteau <mojo@couak.net>
Wed, 5 Jun 2013 15:47:03 +0000 (15:47 +0000)
script.php

index 9bf9578fc49d7136adc6608ed12a752d966e093c..a6b9457e5f9bfb035253a6a77cf8784136fcd05e 100755 (executable)
@@ -250,6 +250,13 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
 /* Lets use interface now. */\r
 header('Content-Type: text; charset=utf-8');\r
 \r
+check_errors ();\r
+if (has_error ())\r
+{\r
+    echo "Error";\r
+    exit;\r
+}\r
+\r
 /* Upload file */\r
 if (isset ($_FILES['file']) && is_writable (VAR_FILES)\r
     && is_writable (VAR_LINKS))\r

patrick-canterino.de