Page MenuHomePhabricator

D21499.id51176.diff
No OneTemporary

D21499.id51176.diff

diff --git a/src/parser/PhutilTypeSpec.php b/src/parser/PhutilTypeSpec.php
--- a/src/parser/PhutilTypeSpec.php
+++ b/src/parser/PhutilTypeSpec.php
@@ -75,6 +75,10 @@
}
break;
case 'regex':
+ if (!is_string($value)) {
+ throw new PhutilTypeCheckException($this, $value, $name);
+ }
+
$trap = new PhutilErrorTrap();
$ok = @preg_match($value, '');
$err = $trap->getErrorsAsString();

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 3:04 PM (2 h, 23 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6932238
Default Alt Text
D21499.id51176.diff (460 B)

Event Timeline