1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-26 03:01:23 +02:00

Fix file not exists by setting line default 1 on editor links (#592)

* Set line default 1 on editor links

* Update HasXdebugLinks.php

* Update HasXdebugLinks.php

---------

Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
This commit is contained in:
Fred
2024-02-13 10:58:36 -05:00
committed by GitHub
parent 72fea42726
commit 91f88d5e24

View File

@@ -48,7 +48,7 @@ trait HasXdebugLinks
* Get an Xdebug Link to a file * Get an Xdebug Link to a file
* *
* @param string $file * @param string $file
* @param int $line * @param int|null $line
* *
* @return array { * @return array {
* @var string $url * @var string $url
@@ -74,7 +74,7 @@ trait HasXdebugLinks
$url = strtr($this->getXdebugLinkTemplate(), [ $url = strtr($this->getXdebugLinkTemplate(), [
'%f' => rawurlencode(str_replace('\\', '/', $file)), '%f' => rawurlencode(str_replace('\\', '/', $file)),
'%l' => rawurlencode((string) $line ?: ''), '%l' => rawurlencode((string) $line ?: 1),
]); ]);
if ($url) { if ($url) {
return [ return [