Skip to content

Commit

Permalink
inflector fix. (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilwylegala authored Nov 16, 2024
1 parent cb3382f commit 789a752
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 789a752

Please sign in to comment.