Skip to content

Commit

Permalink
Prevent invalid DOCUMENT_ROOT from causing a fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Apr 26, 2024
1 parent ebd67a5 commit 5d05600
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified build/kint.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
if (false !== \ini_get('xdebug.file_link_format')) {
Kint::$file_link_format = \ini_get('xdebug.file_link_format');
}
if (isset($_SERVER['DOCUMENT_ROOT'])) {
if (isset($_SERVER['DOCUMENT_ROOT']) && false === \strpos($_SERVER['DOCUMENT_ROOT'], "\0")) {
Kint::$app_root_dirs = [
$_SERVER['DOCUMENT_ROOT'] => '<ROOT>',
];
Expand Down

0 comments on commit 5d05600

Please sign in to comment.