Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhameBlog.php
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | if (!PhabricatorEnv::getEnvConfig('policy.allow-public')) { | ||||
array('href' => $href), | array('href' => $href), | ||||
pht('here'))); | pht('here'))); | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public function getLiveURI() { | public function getLiveURI() { | ||||
if (strlen($this->getDomain())) { | if (phutil_nonempty_string($this->getDomain())) { | ||||
valerio.bozzolan: ✅ I verified the above line
The variable comes from the string input field "Full Domain URI"… | |||||
return $this->getExternalLiveURI(); | return $this->getExternalLiveURI(); | ||||
} else { | } else { | ||||
return $this->getInternalLiveURI(); | return $this->getInternalLiveURI(); | ||||
} | } | ||||
} | } | ||||
public function getExternalLiveURI() { | public function getExternalLiveURI() { | ||||
$uri = new PhutilURI($this->getDomainFullURI()); | $uri = new PhutilURI($this->getDomainFullURI()); | ||||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I verified the above line
The variable comes from the string input field "Full Domain URI" in the page /phame/blog/edit/<number>/ and always is null or a string and never an object.
The function phutil_nonempty_string() will report alien types, and that is OK.