From 4201c1e40100fc01f51e3e851ee01cb2694ada28 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Wed, 20 Nov 2024 13:30:44 +0000 Subject: [PATCH] Prevent `str_replace` warning when using Debugbar --- src/View/Debugbar/AntlersProfiler/PerformanceCollector.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/View/Debugbar/AntlersProfiler/PerformanceCollector.php b/src/View/Debugbar/AntlersProfiler/PerformanceCollector.php index 14136b296c..edb91643e4 100644 --- a/src/View/Debugbar/AntlersProfiler/PerformanceCollector.php +++ b/src/View/Debugbar/AntlersProfiler/PerformanceCollector.php @@ -75,6 +75,10 @@ protected function getEditorHref($filePath, $line) */ protected function replaceSitesPath($filePath) { + if (! config('debugbar.remote_sites_path')) { + return $filePath; + } + return str_replace(config('debugbar.remote_sites_path'), config('debugbar.local_sites_path'), $filePath); }