On first install (and subsequent check), install.php generates the following notices:

Notice: Undefined index: port in c:\program files\apache group\apache\htdocs\drupalhead\install.php on line 113

Notice: Undefined index: port in c:\program files\apache group\apache\htdocs\drupalhead\install.php on line 135

In each case, either in install_verify_settings() or install_change_settings(), following

    $url = parse_url($db_url);

the offending line assumes port is set

  $db_port = urldecode($url['port']);

whereas parse_url() will only set those parts it finds. For clarity and E_ALL compliance we can change to

  $db_port = isset($url['port']) ? urldecode($url['port']) : NULL;

The attached patch does this for both lines. Mark.

CommentFileSizeAuthor
#1 install.php_1.patch1018 bytesJax
install.php_0.patch1018 bytesplumbley
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jax’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1018 bytes

You should set the variable to the empty string because else if there are other issets they will also evaluate to true. Modified your patch to set it to the empty string.

Unless the committer prefers NULL of course. You can choose. Mine is with empty string, the first with NULL. Both tested, both work. Take your pick!

plumbley’s picture

Yes I agree: since urldecode($an_underfined_variable) evaluatues to the empty string, for maximum compatibility I think it should be as you suggest. Mark.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)