isset must be used before use a value into array

This commit is contained in:
Lgnap
2013-04-23 12:02:58 +02:00
parent fe66105581
commit ad239ff694
2 changed files with 3 additions and 3 deletions

View File

@@ -64,8 +64,8 @@ function upload($source, $destination, $content_type="application/octet-stream")
function gpvar($v) {
global $_GET, $_POST;
$x = "";
if ($_GET[$v]) $x = $_GET[$v];
if ($_POST[$v]) $x = $_POST[$v];
if (isset($_GET[$v])) $x = $_GET[$v];
if (isset($_POST[$v])) $x = $_POST[$v];
if (get_magic_quotes_gpc()) $x = stripslashes($x);
return $x;
}