From 8bca87e2e4b948c1377e0f8b76bc133107c37342 Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Wed, 16 Mar 2016 19:52:13 +0100 Subject: [PATCH] Better allow_url_fopen check ini_get can return false or an empty string when the setting is deactivated --- plugins/Diagnostics/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Diagnostics/index.php b/plugins/Diagnostics/index.php index 307a774..c7cf963 100644 --- a/plugins/Diagnostics/index.php +++ b/plugins/Diagnostics/index.php @@ -91,7 +91,7 @@ if (!$settings['dropboxKey']) echo('Warning: Dropbox import not working. No prop // Check php.ini Settings if (ini_get('max_execution_time')<200&&ini_set('upload_max_filesize', '20M')===false) echo('Warning: You may experience problems when uploading a large amount of photos. Take a look in the FAQ for details.' . PHP_EOL); -if (!ini_get('allow_url_fopen')) echo('Warning: You may experience problems with the Dropbox- and URL-Import. Edit your php.ini and set allow_url_fopen to 1.' . PHP_EOL); +if (empty(ini_get('allow_url_fopen'))) echo('Warning: You may experience problems with the Dropbox- and URL-Import. Edit your php.ini and set allow_url_fopen to 1.' . PHP_EOL); // Check mysql version if ($database->server_version<50500) echo('Warning: Lychee uses the GBK charset to avoid sql injections on your MySQL version. Please update to MySQL 5.5 or higher to enable UTF-8 support.' . PHP_EOL);