Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2697319
D25366.1734920613.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
D25366.1734920613.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php
--- a/src/applications/diffusion/controller/DiffusionHistoryController.php
+++ b/src/applications/diffusion/controller/DiffusionHistoryController.php
@@ -50,7 +50,7 @@
// ancestors appropriately, but this would currrently be prohibitively
// expensive in the general case.
- $show_graph = !strlen($drequest->getPath());
+ $show_graph = !phutil_nonempty_string($drequest->getPath());
if ($show_graph) {
$history_list
->setParents($history_results['parents'])
@@ -98,11 +98,10 @@
$viewer = $this->getViewer();
$repository = $drequest->getRepository();
- $no_path = !strlen($drequest->getPath());
- if ($no_path) {
- $header_text = pht('History');
- } else {
+ if (phutil_nonempty_string($drequest->getPath())) {
$header_text = $this->renderPathLinks($drequest, $mode = 'history');
+ } else {
+ $header_text = pht('History');
}
$header = id(new PHUIHeaderView())
diff --git a/src/applications/diffusion/query/pathid/DiffusionPathIDQuery.php b/src/applications/diffusion/query/pathid/DiffusionPathIDQuery.php
--- a/src/applications/diffusion/query/pathid/DiffusionPathIDQuery.php
+++ b/src/applications/diffusion/query/pathid/DiffusionPathIDQuery.php
@@ -48,6 +48,9 @@
*/
public static function normalizePath($path) {
+ // Ensure we have a string, not a null.
+ $path = coalesce($path, '');
+
// Normalize to single slashes, e.g. "///" => "/".
$path = preg_replace('@[/]{2,}@', '/', $path);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 02:23 (18 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1026650
Default Alt Text
D25366.1734920613.diff (1 KB)
Attached To
Mode
D25366: Fix PHP 8.1 Diffusion history errors
Attached
Detach File
Event Timeline
Log In to Comment