diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-09-07 13:46:30 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-09-07 13:46:30 +0200 |
commit | 7083c0a21d27e7e1bf45a9807a76844116d61fb8 (patch) | |
tree | b72b5a0516d9114aeeccd6ecdb055ee240bda66a /var/SymfonyRequirements.php | |
parent | 44043ebe82a22470e2514d05efac324035ee809a (diff) | |
parent | 495f83c92539444bff7dfd6cd647b7d65a74f949 (diff) | |
download | wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.gz wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.zst wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.zip |
Merge remote-tracking branch 'origin/master' into 2.4
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', |