digitalnature / php-ref

A better alternative to print_r / var_dump
347 stars 59 forks source link

Bugfix for Array (Simple) #62

Open kirillminiaev opened 1 year ago

kirillminiaev commented 1 year ago

At least on PHP v8.1 I was getting the following error:

Trying to access array offset on value of type null in /inc/vendor/digitalnature/php-ref/ref.php on line 472

I was able to fix this locally by adjusting line 472 from

if(in_array($parts[1][0], array('&', '$'), true)){

to

if(is_array($parts[1]) && in_array($parts[1][0], array('&', '$'), true)){

Please confirm if this fix works & if this can be adjusted in your repo.