Skip to content

Commit

Permalink
Fix deprecated message appearing in web context with PHP 8.1 (#64)
Browse files Browse the repository at this point in the history
* fix deprecated message appearing in web context with PHP 8.1

* use to PHP7-syntax
  • Loading branch information
driehle authored Aug 1, 2022
1 parent a513a50 commit c2972cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions class.krumo.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,9 @@ public static function dump($data, $second = '')
$_ = debug_backtrace();
while ($d = array_pop($_)) {
$callback = static::$lineNumberTestCallback;
$function = strToLower($d['function']);
if (in_array($function, array("krumo","k","kd")) || (strToLower(@$d['class']) == 'krumo') || (is_callable($callback) && call_user_func($callback, $d))) {
$class = strtolower($d['class'] ?? '');
$function = strtolower($d['function'] ?? '');
if (in_array($function, array('krumo','k','kd')) || $class == 'krumo' || (is_callable($callback) && call_user_func($callback, $d))) {
break;
}
}
Expand Down

0 comments on commit c2972cc

Please sign in to comment.