removed some warnings
authorniekt0 <niekt0@kyberia.cz>
Thu, 13 Oct 2011 20:30:15 +0000 (22:30 +0200)
committerniekt0 <niekt0@kyberia.cz>
Thu, 13 Oct 2011 20:30:15 +0000 (22:30 +0200)
wwwroot/nodes.php

index 1d68665516f06b3f697a799aa3f4d610193affbd..75b613b6737d0adec9b34d6b023442bbc9e4a40a 100644 (file)
@@ -156,11 +156,11 @@ if (!empty($_SESSION['debugging']) && $_SESSION['debugging']) {
 
 // DO NOT MESS WITH THIS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 //creating neural network
-if  (preg_match('/id\/(\d+)/',$_SERVER['HTTP_REFERER'],$match)) {
+if  (preg_match('/id\/(\d+)/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) {
        $referer_id=$match[1];
-} elseif (preg_match('/k\/([a-z0-9]{1,7})/',$_SERVER['HTTP_REFERER'],$match)) {
+} elseif (preg_match('/k\/([a-z0-9]{1,7})/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) {
        $referer_id=base_convert($match[1], 36, 10);
-} elseif (preg_match('/name\/(.*?)\/?$/',$_SERVER['HTTP_REFERER'],$match)) {
+} elseif (preg_match('/name\/(.*?)\/?$/',isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER'] : "",$match)) {
        $referer_id  = nodes::getNodeIdByName($match[1]);
 }
 
This page took 0.248066 seconds and 4 git commands to generate.