Skip to content

Commit

Permalink
Merge branch 'release/2.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 22, 2024
2 parents b4a1170 + e89ed5e commit b090e9d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v2.1.2
## 10/22/2024

1. [](#improved)
* Improved `gd` module check [#36](https://github.com/getgrav/grav-plugin-problems/pull/36)

# v2.1.1
## 04/14/2021

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Problems
slug: problems
type: plugin
version: 2.1.1
version: 2.1.2
description: Detects and reports problems found in the site.
icon: exclamation-circle
author:
Expand Down
12 changes: 7 additions & 5 deletions classes/Problems/PHPModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,21 @@ public function process()
$msg = 'PHP GD (Image Manipulation Library) is %s installed';
if (defined('GD_VERSION') && function_exists('gd_info')) {

$msg = $modules_success['gd'] = sprintf($msg, 'successfully');
$msg = sprintf($msg, 'successfully');

// Extra checks for Image support
$ginfo = gd_info();
$gda = array('PNG Support', 'JPEG Support', 'FreeType Support', 'GIF Read Support');
$gda = array('PNG Support', 'JPEG Support', 'FreeType Support', 'GIF Read Support', 'WebP Support', 'AVIF Support');
$gda_msg = '';
$problems_found = false;

foreach ($gda as $image_type) {
if (!$ginfo[$image_type]) {
if (!array_key_exists($image_type, $ginfo)) {
$problems_found = true;
$gda_msg = "missing $image_type, but is ";
break;
if($gda_msg !== '') {
$gda_msg .= ', ';
}
$gda_msg .= $image_type;
}
}

Expand Down

0 comments on commit b090e9d

Please sign in to comment.