Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2913147
D25217.1737423556.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25217.1737423556.diff
View Options
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
@@ -89,7 +89,7 @@
// temporary and clearing it when users log out.
$value = $request->getCookie(self::COOKIE_CLIENTID);
- if (!strlen($value)) {
+ if (!phutil_nonempty_string($value)) {
$request->setTemporaryCookie(
self::COOKIE_CLIENTID,
Filesystem::readRandomCharacters(16));
diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php
--- a/src/applications/auth/controller/PhabricatorAuthController.php
+++ b/src/applications/auth/controller/PhabricatorAuthController.php
@@ -282,7 +282,7 @@
$viewer,
PhabricatorAuthLoginMessageType::MESSAGEKEY);
- if (!strlen($text)) {
+ if (!phutil_nonempty_string($text)) {
return null;
}
diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php
--- a/src/applications/auth/controller/PhabricatorAuthStartController.php
+++ b/src/applications/auth/controller/PhabricatorAuthStartController.php
@@ -98,7 +98,7 @@
}
$next_uri = $request->getStr('next');
- if (!strlen($next_uri)) {
+ if (!phutil_nonempty_string($next_uri)) {
if ($this->getDelegatingController()) {
// Only set a next URI from the request path if this controller was
// delegated to, which happens when a user tries to view a page which
@@ -112,7 +112,7 @@
}
if (!$request->isFormPost()) {
- if (strlen($next_uri)) {
+ if (phutil_nonempty_string($next_uri)) {
PhabricatorCookies::setNextURICookie($request, $next_uri);
}
PhabricatorCookies::setClientIDCookie($request);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 21, 01:39 (6 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1135570
Default Alt Text
D25217.1737423556.diff (1 KB)
Attached To
Mode
D25217: Fix PHP 8.1 "strlen(null)" exceptions which block rendering Log In page after user logout
Attached
Detach File
Event Timeline
Log In to Comment