(dev/core#177) Redis::get() should return NULL for undefined cache keys
[civicrm-core.git] / CRM / Utils / Type.php
index 3cd8085a2d216dc67f0d3c1ebaa617fe731aa98f..7ddc8dd9d328f5ae4ff49933d1c92ef1de318e92 100644 (file)
@@ -423,6 +423,7 @@ class CRM_Utils_Type {
       'MysqlOrderBy',
       'ExtensionKey',
       'Json',
+      'Alphanumeric',
     );
     if (!in_array($type, $possibleTypes)) {
       if ($isThrowException) {
@@ -537,6 +538,12 @@ class CRM_Utils_Type {
           return $data;
         }
         break;
+
+      case 'Alphanumeric':
+        if (CRM_Utils_Rule::alphanumeric($data)) {
+          return $data;
+        }
+        break;
     }
 
     if ($abort) {