Problem/Motivation

During our simpletest run, there are PHP notices about context query string condition.

$ ... simpletest
Notice: Undefined index: QUERY_STRING in 
/.../modules/contrib/context/plugins/context_condition_query_string.inc on line 19 #0 /.../docroot/includes/bootstrap.inc(2591): _drupal_error_handler_real(8, 'Undefined index...', '/...', 19, Array)
#1 /.../modules/contrib/context/plugins/context_condition_query_string.inc(19): _drupal_error_handler(8, 'Undefined index...', '/...', 19, Array)
#2 /.../modules/contrib/context/context.module(175): context_condition_query_string->execute()
#3 /.../docroot/includes/module.inc(957): context_init()
#4 /.../docroot/includes/common.inc(5310): module_invoke_all('init')
#5 /.../docroot/includes/bootstrap.inc(2538): _drupal_bootstrap_full()
#6 /.../docroot/scripts/...: drupal_bootstrap(7)
#7 {main}

Proposed resolution

Patch attached which sets the value to check against to an empty string if $_SERVER['QUERY_STRING'] is empty.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zeyus created an issue. See original summary.

zeyus’s picture

  • nedjo committed 63da207 on 7.x-3.x authored by zeyus
    Issue #2917541 by zeyus: Query string condition throws PHP Notice when...
nedjo’s picture

Status: Needs review » Fixed
nedjo’s picture

Applied, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.