summaryrefslogtreecommitdiffstats
path: root/uuid-ereg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'uuid-ereg.patch')
-rw-r--r--uuid-ereg.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/uuid-ereg.patch b/uuid-ereg.patch
new file mode 100644
index 0000000..575aecd
--- /dev/null
+++ b/uuid-ereg.patch
@@ -0,0 +1,12 @@
+diff -up uuid-1.0.3/tests/uuid_create.phpt.old uuid-1.0.3/tests/uuid_create.phpt
+--- uuid-1.0.3/tests/uuid_create.phpt.old 2012-11-06 09:30:20.644788269 +0100
++++ uuid-1.0.3/tests/uuid_create.phpt 2012-11-06 09:30:30.512821665 +0100
+@@ -10,7 +10,7 @@ if(!extension_loaded('uuid')) die('skip
+ <?php
+ // check basic format of generated UUIDs
+ $uuid = uuid_create();
+- if (ereg("[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}", $uuid)) {
++ if (preg_match("/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/", $uuid)) {
+ echo "basic format ok\n";
+ } else {
+ echo "basic UUID format check failed, generated UUID was $uuid\n";