Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2688391
D25516.1734721964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
686 B
Referenced Files
None
Subscribers
None
D25516.1734721964.diff
View Options
diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php
--- a/src/applications/files/storage/PhabricatorFile.php
+++ b/src/applications/files/storage/PhabricatorFile.php
@@ -971,10 +971,13 @@
// warns you if you don't have complete support.
$matches = null;
- $ok = preg_match(
- '@^image/(gif|png|jpe?g)@',
- $this->getViewableMimeType(),
- $matches);
+ $ok = false;
+ if ($this->getViewableMimeType() !== null) {
+ $ok = preg_match(
+ '@^image/(gif|png|jpe?g)@',
+ $this->getViewableMimeType(),
+ $matches);
+ }
if (!$ok) {
return false;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 19:12 (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1020525
Default Alt Text
D25516.1734721964.diff (686 B)
Attached To
Mode
D25516: preg_match() null exception setting custom user profile image with empty files.viewable-mime-types
Attached
Detach File
Event Timeline
Log In to Comment