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); }