Fix Hash class callback callable pattern deprecated

This commit is contained in:
Diego Surita 2023-12-19 19:07:45 +00:00 committed by Kamil Wylegala
parent e712b2da89
commit 7acb7c2938

View file

@ -561,7 +561,7 @@ class Hash {
* @return array Filtered array
* @link https://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::filter
*/
public static function filter(array $data, $callback = array('self', '_filter')) {
public static function filter(array $data, $callback = array(Hash::class, '_filter')) {
foreach ($data as $k => $v) {
if (is_array($v)) {
$data[$k] = static::filter($v, $callback);