Page MenuHomePhabricator

D21875.diff
No OneTemporary

D21875.diff

diff --git a/src/applications/auth/constants/PhabricatorCookies.php b/src/applications/auth/constants/PhabricatorCookies.php
--- a/src/applications/auth/constants/PhabricatorCookies.php
+++ b/src/applications/auth/constants/PhabricatorCookies.php
@@ -164,7 +164,7 @@
// Old cookies look like: /uri
// New cookies look like: timestamp,/uri
- if (!strlen($cookie)) {
+ if (!phutil_nonempty_string($cookie)) {
return null;
}
diff --git a/src/applications/auth/controller/PhabricatorAuthSetExternalController.php b/src/applications/auth/controller/PhabricatorAuthSetExternalController.php
--- a/src/applications/auth/controller/PhabricatorAuthSetExternalController.php
+++ b/src/applications/auth/controller/PhabricatorAuthSetExternalController.php
@@ -40,7 +40,7 @@
$text = PhabricatorAuthMessage::loadMessageText(
$viewer,
PhabricatorAuthLinkMessageType::MESSAGEKEY);
- if (!strlen($text)) {
+ if (!phutil_nonempty_string($text)) {
$text = pht(
'You can link your %s account to an external account to '.
'allow you to log in more easily in the future. To continue, choose '.
diff --git a/src/applications/notification/client/PhabricatorNotificationServerRef.php b/src/applications/notification/client/PhabricatorNotificationServerRef.php
--- a/src/applications/notification/client/PhabricatorNotificationServerRef.php
+++ b/src/applications/notification/client/PhabricatorNotificationServerRef.php
@@ -147,7 +147,7 @@
if ($to_path === null || !strlen($to_path)) {
$to_path = '';
} else {
- $to_path = '/'.ltrim($to_path, '/');
+ $to_path = ltrim($to_path, '/');
}
$base_path = $this->getPath();
@@ -156,7 +156,7 @@
} else {
$base_path = rtrim($base_path, '/');
}
- $full_path = $base_path.$to_path;
+ $full_path = $base_path.'/'.$to_path;
$uri = id(new PhutilURI('http://'.$this->getHost()))
->setProtocol($this->getProtocol())

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 3:37 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6775211
Default Alt Text
D21875.diff (1 KB)

Event Timeline