浏览代码

Fix Call Recordings single delete.

Nate 5 年之前
父节点
当前提交
af327084c2
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      resources/functions.php

+ 5 - 2
resources/functions.php

@@ -149,8 +149,11 @@
 
 	if (!function_exists('is_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;
 		}
 	}