X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=var%2FSymfonyRequirements.php;h=3b14a4022d4324a35c42e6f9b8d91150053fedc2;hb=3b46d0f947958e05c55bb10a817e94a860cda6ef;hp=f3e8ca8eb2489934b375c08501cf11204848f567;hpb=58fadbc9df3f8b735c04995919b6cf913ca6a977;p=github%2Fwallabag%2Fwallabag.git diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php index f3e8ca8e..3b14a402 100644 --- a/var/SymfonyRequirements.php +++ b/var/SymfonyRequirements.php @@ -633,12 +633,6 @@ class SymfonyRequirements extends RequirementCollection 'Install and enable the mbstring extension.' ); - $this->addRecommendation( - function_exists('iconv'), - 'iconv() should be available', - 'Install and enable the iconv extension.' - ); - $this->addRecommendation( function_exists('utf8_decode'), 'utf8_decode() should be available', @@ -739,9 +733,9 @@ class SymfonyRequirements extends RequirementCollection if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $this->addRecommendation( - $this->getRealpathCacheSize() > 5 * 1024 * 1024, - 'realpath_cache_size should be above 5242880 in php.ini', - 'Setting "realpath_cache_size" to e.g. "5242880" or "5000k" in php.ini* may improve performance on Windows significantly in some cases.' + $this->getRealpathCacheSize() >= 5 * 1024 * 1024, + 'realpath_cache_size should be at least 5M in php.ini', + 'Setting "realpath_cache_size" to e.g. "5242880" or "5M" in php.ini* may improve performance on Windows significantly in some cases.' ); } @@ -780,7 +774,11 @@ class SymfonyRequirements extends RequirementCollection { $size = ini_get('realpath_cache_size'); $size = trim($size); - $unit = strtolower(substr($size, -1, 1)); + $unit = ''; + if (!ctype_digit($size)) { + $unit = strtolower(substr($size, -1, 1)); + $size = (int) substr($size, 0, -1); + } switch ($unit) { case 'g': return $size * 1024 * 1024 * 1024;