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:
parent
6ec28b1cdd
commit
e70261932c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue