Skip to content

Accessing property without checking the object state causing Joomla installer non-responsive. #21412

@ghost

Description

Steps to reproduce the issue

Prerequisites: PHP notice messages are enabled

After installing Joomla, go to customization and select language say Hindi for installation. If the language cannot be installed, the server will not return any value, and the value is null. But the below code is accessing its properties without checking the data is null or not.

\installation\src\Model\LanguagesModel.php

return trim($update->get('downloadurl', false)->_data);

This resulted in a notice message causing json response invalid.

Notice: Trying to get property of non-object in D:\xampp\htdocs\joomla\installation\src\Model\LanguagesModel.php on line <i>253</i>

Expected result

The installer shows message that it cannot install selected language.

"Joomla was unable to install Hindi language. You will be able to install it later using the Joomla Administrator"

Actual result

Screen frozen

System information (as much as possible)

Joomla v4.0.0.alpha4
Windows, XAMPP, PHP Notice messages enabled

Additional comments

Installing only Hindi language

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions