From 4005427b9c4e86db976e1e13e066edf2a8acfa41 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 13 Aug 2009 13:41:06 +0000
Subject: [PATCH] _include.php: Fix undefined variable reference in magic
 quotes removal code.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1663 44740490-163a-0410-bde0-09ae8108e29a
---
 www/_include.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/_include.php b/www/_include.php
index 3905c218d..0533175d4 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -3,7 +3,7 @@
 /* Remove magic quotes. */
 if(get_magic_quotes_gpc()) {
 	foreach(array('_GET', '_POST', '_COOKIE', '_REQUEST') as $a) {
-		if (is_array($$a)) {
+		if (isset($$a) && is_array($$a)) {
 			foreach($$a as &$v) {
 				/* We don't use array-parameters anywhere.
 				 * Ignore any that may appear.
-- 
GitLab