context.inc/_drush_config_file($context) references $configs[$context] without checking for its existence, causing PHP warnings, which can include a stack dump and thus be really annoying.

The patch just tests for the existence of the key, and returns NULL if it is missing.

CommentFileSizeAuthor
#1 php_warnings.patch1.17 KBfgm
context.patch639 bytesfgm

Comments

fgm’s picture

Title: Remove PHP warning on context » Remove PHP warning on context and command
StatusFileSize
new1.17 KB

Similar problem in includes/command.inc/drush_parse_args(). The function invokes drush_set_context('options', $options); although $options may be undefined if there is no current context.

Patch initializes $options to an empty array, which is the value set in drupal_get_context() when the context is uninitialized.

Since the two are related, combining in a single patch.

moshe weitzman’s picture

Status: Needs review » Fixed

think we fixed these.

Status: Fixed » Closed (fixed)

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