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

Commit 15be698

Browse files
committed
use value of DIRECTORY_SEPARATOR to detect Windows
This commit unifies the detection of Windows builds across the Symfony codebase.
1 parent a542abc commit 15be698

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)