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 12:02:03 -06:00
committed by GitHub
parent 6ec28b1cdd
commit e70261932c
+1 -1
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;