Skip to content

Commit b090e9d

Browse files
committed
Merge branch 'release/2.1.2'
2 parents b4a1170 + e89ed5e commit b090e9d

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v2.1.2
2+
## 10/22/2024
3+
4+
1. [](#improved)
5+
* Improved `gd` module check [#36](https://github.com/getgrav/grav-plugin-problems/pull/36)
6+
17
# v2.1.1
28
## 04/14/2021
39

blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Problems
22
slug: problems
33
type: plugin
4-
version: 2.1.1
4+
version: 2.1.2
55
description: Detects and reports problems found in the site.
66
icon: exclamation-circle
77
author:

classes/Problems/PHPModules.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,21 @@ public function process()
5757
$msg = 'PHP GD (Image Manipulation Library) is %s installed';
5858
if (defined('GD_VERSION') && function_exists('gd_info')) {
5959

60-
$msg = $modules_success['gd'] = sprintf($msg, 'successfully');
60+
$msg = sprintf($msg, 'successfully');
6161

6262
// Extra checks for Image support
6363
$ginfo = gd_info();
64-
$gda = array('PNG Support', 'JPEG Support', 'FreeType Support', 'GIF Read Support');
64+
$gda = array('PNG Support', 'JPEG Support', 'FreeType Support', 'GIF Read Support', 'WebP Support', 'AVIF Support');
6565
$gda_msg = '';
6666
$problems_found = false;
6767

6868
foreach ($gda as $image_type) {
69-
if (!$ginfo[$image_type]) {
69+
if (!array_key_exists($image_type, $ginfo)) {
7070
$problems_found = true;
71-
$gda_msg = "missing $image_type, but is ";
72-
break;
71+
if($gda_msg !== '') {
72+
$gda_msg .= ', ';
73+
}
74+
$gda_msg .= $image_type;
7375
}
7476
}
7577

0 commit comments

Comments
 (0)