Notice trying to access to language object

Created on 7 October 2022, over 2 years ago
Updated 8 May 2023, almost 2 years ago

Problem/Motivation

For some unknown reason, it is possible that "$options['language']" exists but is NULL in locale.inc file. This returns the following error.

Notice: Trying to get property of non-object in locale_language_url_rewrite_url() (line 429 of /var/www/html/includes/locale.inc).

locale.inc

  elseif (!isset($languages[$options['language']->language])) {
    unset($options['language']);
    return;
  }

Proposed resolution

Make sure that the variable is a valid object.

elseif (!is_object($options['language']) || (property_exists($options['language'], 'language') && !isset($languages[$options['language']->language]))) {

πŸ› Bug report
Status

Postponed: needs info

Version

7.0 ⚰️

Component
Language systemΒ  β†’

Last updated 7 days ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡ͺπŸ‡ΈSpain javier_rey

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.

Production build 0.71.5 2024