aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2016-12-09 07:54:21 +0100
committerPim van den Berg2016-12-09 07:54:21 +0100
commit4aef0f7e017cdf7e2b92dc9a9f700368506879e9 (patch)
tree111fff2752c34d314c9ca3c26693be50107c6943
parentinc/html: fix php notice about html_weburl when type is canvas (diff)
downloadapt-panopticon_cgp-4aef0f7e017cdf7e2b92dc9a9f700368506879e9.zip
apt-panopticon_cgp-4aef0f7e017cdf7e2b92dc9a9f700368506879e9.tar.gz
apt-panopticon_cgp-4aef0f7e017cdf7e2b92dc9a9f700368506879e9.tar.bz2
apt-panopticon_cgp-4aef0f7e017cdf7e2b92dc9a9f700368506879e9.tar.xz
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
-rw-r--r--inc/functions.inc.php2
1 files changed, 1 insertions, 1 deletions
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) {
12 return $arr; 12 return $arr;
13 } 13 }
14 14
15 if (!isset($_GET[$index])) 15 if (!isset($_GET[$index]) or strlen($_GET[$index]) == 0)
16 return NULL; 16 return NULL;
17 17
18 if ($value === NULL) 18 if ($value === NULL)