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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | undefined_index-3016751-5.patch | 497 bytes | marknatividad |
| #2 | undefined_index-3016751-2.patch | 1.41 KB | sergiu stici |
Comments
Comment #2
sergiu stici commentedI corrected the issue, here is the patch.
Comment #3
danepowell commentedIt seems like a cleaner fix would be to replace
DOCUMENT_ROOT . base_path()withDRUPAL_ROOT, no?We already did this in checkFilesPresent(), we'd just need to replicate for getVersionInfo().
Comment #4
danepowell commentedComment #5
marknatividad commentedI agree with @dane-powell, replacing with
DRUPAL_ROOTis a cleaner fix.Comment #6
japerry