Commit 63da2071 authored by zeyus's avatar zeyus Committed by Nedjo Rogers

Issue #2917541 by zeyus: Query string condition throws PHP Notice when invoked...

Issue #2917541 by zeyus: Query string condition throws PHP Notice when invoked via simpletest (or drush / CLI)
parent a5852f4f
......@@ -16,7 +16,7 @@ class context_condition_query_string extends context_condition_path {
*/
function execute() {
if ($this->condition_used()) {
$current_query_string = $_SERVER["QUERY_STRING"];
$current_query_string = empty($_SERVER["QUERY_STRING"]) ? '' : $_SERVER["QUERY_STRING"];
foreach ($this->get_contexts() as $context) {
$query_strings = $this->fetch_from_context($context, 'values');
if ($this->match($current_query_string, $query_strings, TRUE)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment