kint-php / kint

Kint - Advanced PHP dumper
https://kint-php.github.io/kint/
MIT License
2.77k stars 291 forks source link

PHP7 - Warning: A non-numeric value encountered #222

Closed turbopixel closed 7 years ago

turbopixel commented 7 years ago

We use PHP 7.1 for a few days. Every Kint Dump print a warning: Warning: A non-numeric value encountered in ...../class/SearchCore.php on line 336

Line 336: -sd( $data );

$data is an array().

Details PHP Version: PHP 7.1.0RC6 php-fpm + nginx php_ini: error_reporting = 32767 Linux version 4.2.0-36-generic (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #41~14.04.1-Ubuntu

jnvsor commented 7 years ago

There is no SearchCore.php in kint. Your problem lies elsewhere

turbopixel commented 7 years ago

I put -sd( $data ) in my own file calling SearchCore.php. And this returns the php error Warning: A non-numeric value encountered ..

Code:


class SearchCore{

    // ...

    public function loadQuery($data){

        -sd( $data );

    }

    // ...

}
jnvsor commented 7 years ago

Ah that makes more sense. I don't have a 7.1 RC here to test but if I had to guess I'd say 7.1 is cracking down on invalid type casts and Kint's modifiers are running foul of that.

Can you confirm if this happens with sd($data)? (No -)

turbopixel commented 7 years ago

Old: The problem only occurs in our company framework.

Edit 03:04PM: Yes -d($array) create the warning. d($array) not.