Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14447955
D21499.id51176.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.id51176.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
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)
Attached To
Mode
D21499: Fix PhutilTypeSpec's regex handling for PHP 8
Attached
Detach File
Event Timeline
Log In to Comment