Page MenuHomePhabricator

D21822.id52005.diff
No OneTemporary

D21822.id52005.diff

diff --git a/src/parser/PhutilURI.php b/src/parser/PhutilURI.php
--- a/src/parser/PhutilURI.php
+++ b/src/parser/PhutilURI.php
@@ -194,7 +194,7 @@
$query = null;
}
- if (strlen($this->getFragment())) {
+ if (phutil_nonempty_string($this->getFragment())) {
$fragment = '#'.$this->getFragment();
} else {
$fragment = null;
@@ -433,7 +433,7 @@
if ($this->isGitURI()) {
// Git URIs use relative paths which do not need to begin with "/".
} else {
- if ($this->domain && strlen($path) && $path[0] !== '/') {
+ if ($this->domain && phutil_nonempty_string($path) && $path[0] !== '/') {
$path = '/'.$path;
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 4:12 AM (5 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6915776
Default Alt Text
D21822.id52005.diff (690 B)

Event Timeline