mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-25 08:17:18 +00:00
inflector fix. (#80)
Some checks failed
PHP Coding Standard / phpcs (7.4) (push) Has been cancelled
Tests / linux-tests (mysql, 8.0) (push) Has been cancelled
Tests / linux-tests (mysql, 8.1) (push) Has been cancelled
Tests / linux-tests (pgsql, 8.0) (push) Has been cancelled
Tests / linux-tests (sqlite, 8.0) (push) Has been cancelled
Some checks failed
PHP Coding Standard / phpcs (7.4) (push) Has been cancelled
Tests / linux-tests (mysql, 8.0) (push) Has been cancelled
Tests / linux-tests (mysql, 8.1) (push) Has been cancelled
Tests / linux-tests (pgsql, 8.0) (push) Has been cancelled
Tests / linux-tests (sqlite, 8.0) (push) Has been cancelled
This commit is contained in:
parent
cb3382f6d2
commit
789a752cf6
2 changed files with 5 additions and 1 deletions
|
@ -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`.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue