From 4aef0f7e017cdf7e2b92dc9a9f700368506879e9 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Fri, 9 Dec 2016 07:54:21 +0100 Subject: inc/functions: check if $_GET value is empty before executing preg_match When using "canvas" mode, a lot of these errors were thrown: > Invalid type instance in $_GET["ti"]: "" > Invalid type instance in $_GET["pi"]: "" Closes: #132 --- inc/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.inc.php b/inc/functions.inc.php index 55807d4..77cbe4b 100644 --- a/inc/functions.inc.php +++ b/inc/functions.inc.php @@ -12,7 +12,7 @@ function GET($index = NULL, $value = NULL) { return $arr; } - if (!isset($_GET[$index])) + if (!isset($_GET[$index]) or strlen($_GET[$index]) == 0) return NULL; if ($value === NULL) -- cgit v1.1