1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-29 03:07:42 +01: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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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