Page MenuHomePhabricator

D21822.diff
No OneTemporary

D21822.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
Thu, May 9, 7:41 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6272591
Default Alt Text
D21822.diff (690 B)

Event Timeline