From f89081fa3b649a1b044e0ed2f88361a991414e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Wylega=C5=82a?= Date: Sat, 16 Nov 2024 17:59:04 +0100 Subject: [PATCH] inflector fix. --- 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 @@ public static function underscore($camelCasedWord) { */ 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); }