Page MenuHomePhorge

D25186.1734623128.diff
No OneTemporary

D25186.1734623128.diff

diff --git a/src/applications/files/controller/PhabricatorFileViewController.php b/src/applications/files/controller/PhabricatorFileViewController.php
--- a/src/applications/files/controller/PhabricatorFileViewController.php
+++ b/src/applications/files/controller/PhabricatorFileViewController.php
@@ -311,7 +311,7 @@
$file->getStorageHandle());
$custom_alt = $file->getCustomAltText();
- if (strlen($custom_alt)) {
+ if (phutil_nonempty_string($custom_alt)) {
$finfo->addProperty(pht('Custom Alt Text'), $custom_alt);
}
diff --git a/src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php b/src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php
--- a/src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php
+++ b/src/applications/files/document/render/PhabricatorDocumentRenderingEngine.php
@@ -60,12 +60,12 @@
}
$encode_setting = $request->getStr('encode');
- if (strlen($encode_setting)) {
+ if (phutil_nonempty_string($encode_setting)) {
$engine->setEncodingConfiguration($encode_setting);
}
$highlight_setting = $request->getStr('highlight');
- if (strlen($highlight_setting)) {
+ if (phutil_nonempty_string($highlight_setting)) {
$engine->setHighlightingConfiguration($highlight_setting);
}
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
@@ -1278,7 +1278,7 @@
public function getAltText() {
$alt = $this->getCustomAltText();
- if (strlen($alt)) {
+ if (phutil_nonempty_string($alt)) {
return $alt;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 15:45 (22 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015142
Default Alt Text
D25186.1734623128.diff (1 KB)

Event Timeline