Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2628143
D25295.1732016308.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
967 B
Referenced Files
None
Subscribers
None
D25295.1732016308.diff
View Options
diff --git a/src/applications/repository/xaction/PhabricatorRepositoryMaintenanceTransaction.php b/src/applications/repository/xaction/PhabricatorRepositoryMaintenanceTransaction.php
--- a/src/applications/repository/xaction/PhabricatorRepositoryMaintenanceTransaction.php
+++ b/src/applications/repository/xaction/PhabricatorRepositoryMaintenanceTransaction.php
@@ -25,11 +25,14 @@
$old = $this->getOldValue();
$new = $this->getNewValue();
- if (strlen($old) && !strlen($new)) {
+ $old_nonempty = phutil_nonempty_string($old);
+ $new_nonempty = phutil_nonempty_string($new);
+
+ if ($old_nonempty && !$new_nonempty) {
return pht(
'%s took this repository out of maintenance mode.',
$this->renderAuthor());
- } else if (!strlen($old) && strlen($new)) {
+ } else if (!$old_nonempty && $new_nonempty) {
return pht(
'%s put this repository into maintenance mode.',
$this->renderAuthor());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 11:38 (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
977600
Default Alt Text
D25295.1732016308.diff (967 B)
Attached To
Mode
D25295: Fix PHP 8.1 "strlen(null)" exception on History page of Diffusion repo after setting maintenance mode
Attached
Detach File
Event Timeline
Log In to Comment