From 789a752cf6a099913fd56b80f6ef05bf4b10d166 Mon Sep 17 00:00:00 2001 From: Kamil Wylegala Date: Sat, 16 Nov 2024 18:07:14 +0100 Subject: [PATCH] inflector fix. (#80) --- README.md | 4 ++++ lib/Cake/Utility/Inflector.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 773536179..d5d8e2584 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ It means that composer will look at `master` branch of repository configured und ## Changelog +### 2024-11-16 + +- Inflector fix: str_place with null. + ### 2024-09-21 - Added wrapper for PDOException to avoid creating dynamic property `queryString`. diff --git a/lib/Cake/Utility/Inflector.php b/lib/Cake/Utility/Inflector.php index d0ec62f47..a14fbb1e8 100644 --- a/lib/Cake/Utility/Inflector.php +++ b/lib/Cake/Utility/Inflector.php @@ -500,7 +500,7 @@ class Inflector { */ public static function humanize($lowerCaseAndUnderscoredWord) { if (!($result = static::_cache(__FUNCTION__, $lowerCaseAndUnderscoredWord))) { - $result = explode(' ', str_replace('_', ' ', $lowerCaseAndUnderscoredWord)); + $result = explode(' ', str_replace('_', ' ', $lowerCaseAndUnderscoredWord ?? "")); foreach ($result as &$word) { $word = mb_strtoupper(mb_substr($word, 0, 1)) . mb_substr($word, 1); }