greenlion / PHP-SQL-Parser

A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL
BSD 3-Clause "New" or "Revised" License
601 stars 156 forks source link

#347 fixes deprecation warning with PHP 8.1 #349

Closed garethellis36 closed 2 years ago

garethellis36 commented 2 years ago

I haven't been able to run test suite on this because I don't have PHP 5.x installed... ha.

The issue raised in #347 is because $out was set to false and PHP now issues a deprecation notice if you try to implicitly convert a bool to an array. To fix this, I changed $out to being initialized as an empty array, and then at the end of the method, returned false to preserve BC if the array was still empty.