diff --git a/CHANGELOG b/CHANGELOG index 91d7a27f..00a39ce7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Akeeba Panopticon 1.2.3 ================================================================================ # [HIGH] Cannot connect to really old WordPress installations (WordPress 5.5 and earlier) +# [HIGH] PHP error when WordPress fails to provide version information Akeeba Panopticon 1.2.2 ================================================================================ diff --git a/ViewTemplates/Sites/item_joomlaupdate.blade.php b/ViewTemplates/Sites/item_joomlaupdate.blade.php index 129e361f..9d38cf2c 100644 --- a/ViewTemplates/Sites/item_joomlaupdate.blade.php +++ b/ViewTemplates/Sites/item_joomlaupdate.blade.php @@ -82,7 +82,17 @@ @stop @section('jUpdateStatus') - @if(!$this->siteConfig->get('core.extensionAvailable', true)) + @if (empty($currentVersion)) +
+

+ + @lang('PANOPTICON_SITE_LBL_JUPDATE_NO_VERSION_HEAD') +

+

+ @lang('PANOPTICON_SITE_LBL_JUPDATE_NO_VERSION_BODY') +

+
+ @elseif(!$this->siteConfig->get('core.extensionAvailable', true))

diff --git a/ViewTemplates/Sites/item_php.blade.php b/ViewTemplates/Sites/item_php.blade.php index 33a8cacc..d979426c 100644 --- a/ViewTemplates/Sites/item_php.blade.php +++ b/ViewTemplates/Sites/item_php.blade.php @@ -24,7 +24,7 @@ $minimumSupportedBranch = $phpVersion?->getMinimumSupportedBranch(); $isUnknown = $versionInfo?->unknown; $isOutOfDate = $versionInfo?->eol; -$isLatestVersionInBranch = version_compare($php, $latestVersionInBranch, 'ge'); +$isLatestVersionInBranch = version_compare($php, $latestVersionInBranch ?? '0.0.0', 'ge'); $isLatestBranch = $phpBranch === $phpVersion->getLatestBranch(); $isRecommendedBranch = $phpBranch === $phpVersion->getRecommendedSupportedBranch(); $isOldestBranch = $phpBranch === $minimumSupportedBranch; @@ -57,7 +57,16 @@

{{-- PHP Status --}} - @if($isUnknown) + @if($php === '0.0.0' || $php === null) +
+

+ + @lang('PANOPTICON_SITE_LBL_PHP_MISSING') +

+ + @lang('PANOPTICON_SITE_LBL_PHP_MISSING_INFO') +
+ @elseif($isUnknown)

diff --git a/ViewTemplates/Sites/item_wpupdate.blade.php b/ViewTemplates/Sites/item_wpupdate.blade.php index 9f322add..8ab64afd 100644 --- a/ViewTemplates/Sites/item_wpupdate.blade.php +++ b/ViewTemplates/Sites/item_wpupdate.blade.php @@ -77,10 +77,20 @@ @stop @section('wpUpdateStatus') - @if ($this->siteConfig->get('core.canUpgrade', false)) + @if (empty($currentVersion)) +
+

+ + @lang('PANOPTICON_SITE_LBL_WPUPDATE_NO_VERSION_HEAD') +

+

+ @lang('PANOPTICON_SITE_LBL_WPUPDATE_NO_VERSION_BODY') +

+
+ @elseif ($this->siteConfig->get('core.canUpgrade', false))

- + @sprintf('PANOPTICON_SITE_LBL_WPUPDATE_AVAILABLE_UPDATE', $this->escape($latestVersion))

@@ -221,7 +231,7 @@ class="btn btn-outline-danger" role="button">

- + @lang('PANOPTICON_SITE_LBL_WPUPDATE_HEAD')