Update functions.php

Make is_uuid more generic.
This commit is contained in:
FusionPBX
2016-12-24 14:11:15 -07:00
committed by GitHub
parent 3eebd937e3
commit f414d866e5

View File

@@ -143,8 +143,7 @@
if (!function_exists('is_uuid')) {
function is_uuid($uuid) {
//uuid version 4
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i';
return preg_match($regex, $uuid);
}
}