Page MenuHomePhorge

D25221.1737225004.diff
No OneTemporary

D25221.1737225004.diff

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,10 +346,11 @@
}
private function parseDimension($string) {
- $string = trim($string);
-
- if (preg_match('/^(?:\d*\\.)?\d+%?$/', $string)) {
- return $string;
+ if ($string !== null) {
+ $string = trim($string);
+ if (preg_match('/^(?:\d*\\.)?\d+%?$/', $string)) {
+ return $string;
+ }
}
return null;

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 18:30 (2 d, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127438
Default Alt Text
D25221.1737225004.diff (834 B)

Event Timeline