Update functions.php (#5366)

Updated the Windows UUID function. The current code PHP_OS === 'Windows'  is limited to non servers.  New code factors in Server and non servers.
This commit is contained in:
jrmcclean 2020-07-29 14:02:03 -04:00 committed by GitHub
parent 6ec28b1cdd
commit e70261932c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@
}
}
}
if (PHP_OS === 'Windows' && function_exists('com_create_guid')) {
if ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') && function_exists('com_create_guid')) {
$uuid = trim(com_create_guid(), '{}');
if (is_uuid($uuid)) {
return $uuid;