Explorar el Código

Fix Call Recordings single delete.

Nate hace 6 años
padre
commit
af327084c2
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      resources/functions.php

+ 5 - 2
resources/functions.php

@@ -149,8 +149,11 @@
 
 
 	if (!function_exists('is_uuid')) {
 	if (!function_exists('is_uuid')) {
 		function is_uuid($uuid) {
 		function is_uuid($uuid) {
-			$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);
+			if (gettype($uuid) == 'string') {
+				$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);
+			}
+			return false;
 		}
 		}
 	}
 	}