From 87580ed6b808c6b2034747e9a8aa8ce225c63e47 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Wed, 18 Nov 2020 07:49:22 -0700 Subject: [PATCH 1/3] Environment GD/Imagick check available & supported formats. --- prepare.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prepare.php b/prepare.php index 5be3988..97b4bc6 100644 --- a/prepare.php +++ b/prepare.php @@ -51,6 +51,8 @@ \$env = array( 'php_version' => phpversion(), 'php_modules' => array(), + 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : 'unavailable', + 'Imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable' 'system_utils' => array(), 'mysql_version' => trim( shell_exec( 'mysql --version' ) ), 'os_name' => trim( shell_exec( 'uname -s' ) ), From ab833e26a07aaab274e90ba5789d099309908eb3 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 19 Nov 2020 11:46:36 -0700 Subject: [PATCH 2/3] Add image info in `functions.php` plus cleanup naming, add missing comma. --- functions.php | 2 ++ prepare.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 62cfe8c..5962d0a 100644 --- a/functions.php +++ b/functions.php @@ -187,6 +187,8 @@ function get_env_details() { $env = array( 'php_version' => phpversion(), 'php_modules' => array(), + 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : 'unavailable', + 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable', 'system_utils' => array(), 'mysql_version' => trim( shell_exec( 'mysql --version' ) ), 'os_name' => trim( shell_exec( 'uname -s' ) ), diff --git a/prepare.php b/prepare.php index 97b4bc6..ca9ea08 100644 --- a/prepare.php +++ b/prepare.php @@ -52,7 +52,7 @@ 'php_version' => phpversion(), 'php_modules' => array(), 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : 'unavailable', - 'Imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable' + 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable', 'system_utils' => array(), 'mysql_version' => trim( shell_exec( 'mysql --version' ) ), 'os_name' => trim( shell_exec( 'uname -s' ) ), From 965d2bfc82615bad84870d3aa76c8d80a833293e Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Wed, 23 Dec 2020 09:21:00 -0700 Subject: [PATCH 3/3] Default to empty array for gd/imagick info. --- functions.php | 4 ++-- prepare.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 5962d0a..7d8df46 100644 --- a/functions.php +++ b/functions.php @@ -187,8 +187,8 @@ function get_env_details() { $env = array( 'php_version' => phpversion(), 'php_modules' => array(), - 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : 'unavailable', - 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable', + 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : array(), + 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : array(), 'system_utils' => array(), 'mysql_version' => trim( shell_exec( 'mysql --version' ) ), 'os_name' => trim( shell_exec( 'uname -s' ) ), diff --git a/prepare.php b/prepare.php index ca9ea08..5697a7a 100644 --- a/prepare.php +++ b/prepare.php @@ -51,8 +51,8 @@ \$env = array( 'php_version' => phpversion(), 'php_modules' => array(), - 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : 'unavailable', - 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : 'unavailable', + 'gd_info' => extension_loaded( 'gd' ) ? gd_info() : array(), + 'imagick_info' => extension_loaded( 'imagick' ) ? Imagick::queryFormats() : array(), 'system_utils' => array(), 'mysql_version' => trim( shell_exec( 'mysql --version' ) ), 'os_name' => trim( shell_exec( 'uname -s' ) ),