diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php index ae0849434b14..62c7ccda605f 100644 --- a/src/Illuminate/Support/Str.php +++ b/src/Illuminate/Support/Str.php @@ -520,11 +520,7 @@ public static function isUuid($value) return false; } - if ($value === '00000000-0000-0000-0000-000000000000') { - return true; - } - - return preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iD', $value) > 0; + return preg_match('/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iD', $value) > 0; } /** diff --git a/tests/Support/SupportStrTest.php b/tests/Support/SupportStrTest.php index c455c64d65be..8a2e7979f70c 100755 --- a/tests/Support/SupportStrTest.php +++ b/tests/Support/SupportStrTest.php @@ -965,8 +965,6 @@ public static function invalidUuidList() ['af6f8cb-c57d-11e1-9b21-0800200c9a66'], ['af6f8cb0c57d11e19b210800200c9a66'], ['ff6f8cb0-c57da-51e1-9b21-0800200c9a66'], - ['ff6f8cb0-c57d-11e1-cb21-0800200c9a66'], // Invalid variant - ['ff6f8cb0-c57d-61e1-9b21-0800200c9a66'], // Invalid version ]; }