Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit df8af09

Browse files
committed
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
2 parents f751ab5 + 15be698 commit df8af09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Core/Util/SecureRandom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct($seedFile = null, LoggerInterface $logger = null)
4343
$this->logger = $logger;
4444

4545
// determine whether to use OpenSSL
46-
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50304) {
46+
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50304) {
4747
$this->useOpenSsl = false;
4848
} elseif (!function_exists('openssl_random_pseudo_bytes')) {
4949
if (null !== $this->logger) {

0 commit comments

Comments
 (0)