diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-06-15 07:33:35 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-06-19 09:45:19 +0200 |
commit | 92cb8acae9f4f6251d55ad9f105908e4344749b7 (patch) | |
tree | 54a5b761594be6e8bdc5eb787d859805d75b0599 /var/SymfonyRequirements.php | |
parent | e586d65b64089fc1cc230a18c470aae3f45f91a6 (diff) | |
download | wallabag-2.3.3.tar.gz wallabag-2.3.3.tar.zst wallabag-2.3.3.zip |
Release wallabag 2.3.32.3.3
Diffstat (limited to 'var/SymfonyRequirements.php')
-rw-r--r-- | var/SymfonyRequirements.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php index 3b14a402..4a1fcc62 100644 --- a/var/SymfonyRequirements.php +++ b/var/SymfonyRequirements.php | |||
@@ -389,7 +389,7 @@ class SymfonyRequirements extends RequirementCollection | |||
389 | { | 389 | { |
390 | /* mandatory requirements follow */ | 390 | /* mandatory requirements follow */ |
391 | 391 | ||
392 | $installedPhpVersion = phpversion(); | 392 | $installedPhpVersion = PHP_VERSION; |
393 | $requiredPhpVersion = $this->getPhpRequiredVersion(); | 393 | $requiredPhpVersion = $this->getPhpRequiredVersion(); |
394 | 394 | ||
395 | $this->addRecommendation( | 395 | $this->addRecommendation( |
@@ -448,15 +448,8 @@ class SymfonyRequirements extends RequirementCollection | |||
448 | } | 448 | } |
449 | 449 | ||
450 | if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { | 450 | if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { |
451 | $timezones = array(); | ||
452 | foreach (DateTimeZone::listAbbreviations() as $abbreviations) { | ||
453 | foreach ($abbreviations as $abbreviation) { | ||
454 | $timezones[$abbreviation['timezone_id']] = true; | ||
455 | } | ||
456 | } | ||
457 | |||
458 | $this->addRequirement( | 451 | $this->addRequirement( |
459 | isset($timezones[@date_default_timezone_get()]), | 452 | in_array(@date_default_timezone_get(), DateTimeZone::listIdentifiers(), true), |
460 | sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), | 453 | sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), |
461 | 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.' | 454 | 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.' |
462 | ); | 455 | ); |
@@ -731,7 +724,7 @@ class SymfonyRequirements extends RequirementCollection | |||
731 | 'Install and/or enable a <strong>PHP accelerator</strong> (highly recommended).' | 724 | 'Install and/or enable a <strong>PHP accelerator</strong> (highly recommended).' |
732 | ); | 725 | ); |
733 | 726 | ||
734 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | 727 | if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) { |
735 | $this->addRecommendation( | 728 | $this->addRecommendation( |
736 | $this->getRealpathCacheSize() >= 5 * 1024 * 1024, | 729 | $this->getRealpathCacheSize() >= 5 * 1024 * 1024, |
737 | 'realpath_cache_size should be at least 5M in php.ini', | 730 | 'realpath_cache_size should be at least 5M in php.ini', |