diff --git a/class.krumo.php b/class.krumo.php index 6ac1550..c83a6f7 100644 --- a/class.krumo.php +++ b/class.krumo.php @@ -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; } } @@ -1607,7 +1608,7 @@ private static function cli_dump() { } foreach ($args as $i) { - $out = var_export($i); + $out = var_export($i) ?? ''; print trim($out); if (sizeof($args) >= 1) { diff --git a/composer.json b/composer.json index 5abac28..3781d61 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } ], "require": { - "php": ">=5.2.17" + "php": ">=7.0" }, "require-dev": { "fabpot/php-cs-fixer": "dev-master",