Skip to content

Commit

Permalink
Bugfix file_link_format type
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Nov 22, 2022
1 parent 35d9d0e commit dd7fbd9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Binary file modified build/kint.phar
Binary file not shown.
4 changes: 3 additions & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
\define('KINT_PHP83', \version_compare(PHP_VERSION, '8.3') >= 0);

// Dynamic default settings
Kint::$file_link_format = \ini_get('xdebug.file_link_format');
if (false !== \ini_get('xdebug.file_link_format')) {
Kint::$file_link_format = \ini_get('xdebug.file_link_format');
}
if (isset($_SERVER['DOCUMENT_ROOT'])) {
Kint::$app_root_dirs = [
$_SERVER['DOCUMENT_ROOT'] => '<ROOT>',
Expand Down
6 changes: 6 additions & 0 deletions tests/KintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,12 @@ public function testShortenPath($path, $expect)
*/
public function testGetIdeLink()
{
if (false !== \ini_get('xdebug.file_link_format')) {
$this->assertSame(\ini_get('xdebug.file_link_format'), Kint::$file_link_format);
} else {
$this->assertSame('', Kint::$file_link_format);
}

Kint::$file_link_format = '<a href="%f:%l">%f:%l</a>';

$file = \bin2hex(\random_bytes(16));
Expand Down

0 comments on commit dd7fbd9

Please sign in to comment.