PHP warning Undefined array key "html" Drupal/core/includes/theme.inc

Created on 22 August 2022, about 2 years ago
Updated 7 October 2023, about 1 year ago

Problem/Motivation

Warning: Undefined array key "html" in template_preprocess_html() Drupal/core/includes/theme.inc

Steps to reproduce

Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice
and It seems That does not provide ['html']['page'].

Proposed resolution

Before :
In Drupal/core/includes/theme.inc

<?php
$variables['page'] = $variables['html']['page'];
?>

After Change :
In Drupal/core/includes/theme.inc

<?php
$variables['page'] = $variables['html']['page'] ?? '';
?>

Remaining tasks

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

🐛 Bug report
Status

Closed: cannot reproduce

Version

9.5

Component
Theme 

Last updated about 10 hours ago

Created by

🇮🇳India rnaik16 Andhra Pradesh

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone

    @rnaik16, can you supply the information asked for in #2 and #8.

    Since we need more information to move forward with this issue, I am keeping the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Issue was unassigned.
  • Status changed to Closed: cannot reproduce about 1 year ago
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" 3 months ago.

    Since we need additional information for this issue to progress, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].

    Thanks!

Production build 0.71.5 2024