From 5803c0676595f68572f38922e4e6d197302f951b Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 2 Jan 2011 19:50:08 +0000 Subject: [PATCH] Check that argv is set before operating on it. Signed-off-by: Edward Z. Yang --- tests/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.php b/tests/common.php index aae5ea7e..223a5bf1 100644 --- a/tests/common.php +++ b/tests/common.php @@ -86,7 +86,7 @@ require 'path2class.func.php'; * */ function htmlpurifier_parse_args(&$AC, $aliases) { - if (empty($_GET)) { + if (empty($_GET) && !empty($_SERVER['argv'])) { array_shift($_SERVER['argv']); $o = false; $bool = false; -- 2.11.4.GIT