From bd23d65292b6eda5c00e85ddce27235b5529a565 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Wed, 5 Jun 2013 15:47:03 +0000 Subject: [PATCH 1/1] prevent api exec in case of problem --- script.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script.php b/script.php index 9bf9578..a6b9457 100755 --- a/script.php +++ b/script.php @@ -250,6 +250,13 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) /* Lets use interface now. */ header('Content-Type: text; charset=utf-8'); +check_errors (); +if (has_error ()) +{ + echo "Error"; + exit; +} + /* Upload file */ if (isset ($_FILES['file']) && is_writable (VAR_FILES) && is_writable (VAR_LINKS)) -- 2.34.1