Problem/Motivation

(Why the issue was filed, steps to reproduce the problem, etc.)

When running a Drupal install via Drush, I am getting the following output:

[info] Undefined index: DOCUMENT_ROOT SpiController.php:753
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284
[info] Undefined index: DOCUMENT_ROOT SpiController.php:284

Proposed resolution

(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)

Either replace the DOCUMENT_ROOT with another method of determining location, or check that it is set before using it.

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)

n/a

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

n/a

Data model changes

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

n/a

Comments

mikemadison created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

I corrected the issue, here is the patch.

danepowell’s picture

It seems like a cleaner fix would be to replace DOCUMENT_ROOT . base_path() with DRUPAL_ROOT, no?

We already did this in checkFilesPresent(), we'd just need to replicate for getVersionInfo().

danepowell’s picture

Status: Needs review » Needs work
marknatividad’s picture

StatusFileSize
new497 bytes

I agree with @dane-powell, replacing with DRUPAL_ROOT is a cleaner fix.

japerry’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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