diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2014-12-30 14:27:52 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2014-12-30 14:27:52 +0100 |
commit | df8af09622578fad046f18c0cab2ef238722b8d1 (patch) | |
tree | 4ca70dba95ccef31c8e3978b42def33bd6781e10 /Core/Util | |
parent | f751ab52989df43f6bebbec3a7ba5dd5ecccaa62 (diff) | |
parent | 15be6987394517ec539fa6465ec2e022796f62ea (diff) | |
download | symfony-security-df8af09622578fad046f18c0cab2ef238722b8d1.zip symfony-security-df8af09622578fad046f18c0cab2ef238722b8d1.tar.gz symfony-security-df8af09622578fad046f18c0cab2ef238722b8d1.tar.bz2 |
minor #13147 [2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows (xabbuh)
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This commit unifies the detection of Windows builds across the Symfony
codebase.
Commits
-------
20a427d use value of DIRECTORY_SEPARATOR to detect Windows
Diffstat (limited to 'Core/Util')
-rw-r--r-- | Core/Util/SecureRandom.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Core/Util/SecureRandom.php b/Core/Util/SecureRandom.php index aefc888..c0924df 100644 --- a/Core/Util/SecureRandom.php +++ b/Core/Util/SecureRandom.php @@ -43,7 +43,7 @@ final class SecureRandom implements SecureRandomInterface $this->logger = $logger; // determine whether to use OpenSSL - if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50304) { + if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50304) { $this->useOpenSsl = false; } elseif (!function_exists('openssl_random_pseudo_bytes')) { if (null !== $this->logger) { |