Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15340356
D21499.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
460 B
Referenced Files
None
Subscribers
None
D21499.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 3:02 PM (7 h, 51 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7225587
Default Alt Text
D21499.diff (460 B)
Attached To
Mode
D21499: Fix PhutilTypeSpec's regex handling for PHP 8
Attached
Detach File
Event Timeline
Log In to Comment