kamilwylegala / cakephp2-php8

CakePHP 2 fork that supports PHP 8
116 stars 51 forks source link

Fix deprecation error in I18n #71

Closed pbarabe closed 1 month ago

pbarabe commented 1 month ago

Utility\I18n's protected _bindTextDomain() method was sometimes assigning an array key to an array element that evaluated as false. This was trigging deprecation error 'Automatic conversion of false to array is deprecated'.

This modification checks whether the array element is false and explicitly converts it to an array if it is.

closes #70

kamilwylegala commented 1 month ago

@pbarabe Thanks for your contribution. Running tests.