Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694276
D25221.1734776503.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
812 B
Referenced Files
None
Subscribers
None
D25221.1734776503.diff
View Options
diff --git a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
--- a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
+++ b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
@@ -197,7 +197,7 @@
$alt = $options['alt'];
}
- if (!strlen($alt)) {
+ if (!phutil_nonempty_string($alt)) {
$alt = $file->getAltText();
}
@@ -346,9 +346,11 @@
}
private function parseDimension($string) {
- $string = trim($string);
+ if (phutil_nonempty_string($string)) {
+ $string = trim($string);
+ }
- if (preg_match('/^(?:\d*\\.)?\d+%?$/', $string)) {
+ if ($string && preg_match('/^(?:\d*\\.)?\d+%?$/', $string)) {
return $string;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 10:21 (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024531
Default Alt Text
D25221.1734776503.diff (812 B)
Attached To
Mode
D25221: Fix PHP 8.1 exceptions which block adding an embedded File preview as a Comment
Attached
Detach File
Event Timeline
Log In to Comment