Skip to content

Commit 99ea162

Browse files
authored
[5.4] Pre-Update Check: php_minimum (joomla#45911)
* Pre-Update Check: Show correct php_minimum required version
1 parent c5e273a commit 99ea162

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

administrator/components/com_joomlaupdate/src/Model/UpdateModel.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,9 +1560,13 @@ private function getTargetMinimumPHPVersion()
15601560
{
15611561
$updateInformation = $this->getUpdateInformation();
15621562

1563-
return isset($updateInformation['object']->php_minimum) ?
1564-
$updateInformation['object']->php_minimum->_data :
1565-
JOOMLA_MINIMUM_PHP;
1563+
// Check if php_minimum exists and return its value
1564+
if (isset($updateInformation['object']) && $updateInformation['object']->get('php_minimum')) {
1565+
return $updateInformation['object']->get('php_minimum')->_data;
1566+
}
1567+
1568+
// Fallback to JOOMLA_MINIMUM_PHP if php_minimum is not set
1569+
return JOOMLA_MINIMUM_PHP;
15661570
}
15671571

15681572
/**

0 commit comments

Comments
 (0)