mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
php 8.1 deprecations (#494)
* php 8.1 deprecations * php 8.1 deprecations * Update DataFormatter.php
This commit is contained in:
parent
d7a9c22602
commit
0d44b75f3b
@ -789,6 +789,8 @@ class JavascriptRenderer
|
||||
return $uris;
|
||||
}
|
||||
|
||||
$uri = $uri ?? '';
|
||||
|
||||
if (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri)) {
|
||||
return $uri;
|
||||
}
|
||||
@ -805,7 +807,7 @@ class JavascriptRenderer
|
||||
protected function filterAssetArray($array, $type = '')
|
||||
{
|
||||
$types = array('css', 'js', 'inline_css', 'inline_js', 'inline_head');
|
||||
$typeIndex = array_search(strtolower($type), $types);
|
||||
$typeIndex = array_search(strtolower($type ?? ''), $types);
|
||||
return $typeIndex !== false ? $array[$typeIndex] : $array;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user