Error handler crashes with Undefined constant "DRUPAL_TEST_IN_CHILD_SITE"

Created on 3 October 2024, 7 months ago

Problem/Motivation

🐛 Maintenance pages leak sensitive environment information. Needs review was added to prevent leakage of paths from maintenance pages.

Currently when a low level error occurs while loading install.php instead of displaying a (sanitized) information message the error handler crashes with:

Error: Undefined constant "DRUPAL_TEST_IN_CHILD_SITE" in _drupal_error_handler_real() (line 87 of core/includes/errors.inc).

_drupal_error_handler_real() (Line: 166)
_drupal_error_handler()
file_get_contents() (Line: 16)
include() (Line: 765)
require() (Line: 150)
Drupal\Core\Site\Settings::initialize() (Line: 341)
install_begin_request() (Line: 118)
install_drupal() (Line: 53)

Steps to reproduce

Place

file_get_contents("/dev/invalid");

in settings.php and visit install.php.

Tested on 10.3.x-dev, may be present on other branches.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.3

Component

base system

Created by

🇺🇸United States cmlara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024