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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user