No Code Attached Yet
avatar joeforjoomla
joeforjoomla
30 May 2022

Steps to reproduce the issue

Install an extension with schema updates

Expected result

No installer error

Actual result

Warning because an unitialized variable $version is used at line 1334 in the file root/libraries/src/Installer/Installer.php
Log::add(Text::sprintf('JLIB_INSTALLER_SQL_BEGIN_SCHEMA', $version), Log::INFO, 'Update');

System information (as much as possible)

Joomla 4.2 Alpha 3

Additional comments

j42_installer

avatar joeforjoomla joeforjoomla - open - 30 May 2022
avatar joomla-cms-bot joomla-cms-bot - change - 30 May 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 May 2022
avatar joeforjoomla joeforjoomla - change - 30 May 2022
The description was changed
avatar joeforjoomla joeforjoomla - edited - 30 May 2022
avatar joeforjoomla joeforjoomla - change - 30 May 2022
The description was changed
avatar joeforjoomla joeforjoomla - edited - 30 May 2022
avatar richard67
richard67 - comment - 31 May 2022

Confirmed. In 4.1-dev we have that log statement below the code where we fetch the version from DB (and set it to '0.0.0' if not found), so 4.1-dev is ok: https://github.com/joomla/joomla-cms/blob/4.1-dev/libraries/src/Installer/Installer.php#L1179

In 4.2-dev we have that log statement before the code where we fetch the version: https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Installer/Installer.php#L1334 . This was caused by PR #36506 .

The solution is to move that log to below so it comes just before this foreach: https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Installer/Installer.php#L1364 .

avatar richard67 richard67 - change - 31 May 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-05-31 13:01:43
Closed_By richard67
avatar richard67 richard67 - close - 31 May 2022
avatar richard67
richard67 - comment - 31 May 2022

Closing as having a pull request. Please test #37941 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment