mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 02:22:39 +00:00
Use (int) cast instead of intval() function for performance reasons and to unify it.
This commit is contained in:
parent
58bf005c09
commit
e77f96d8b7
12 changed files with 25 additions and 25 deletions
|
@ -290,8 +290,8 @@ class Hash {
|
|||
$count = count($path);
|
||||
$last = $count - 1;
|
||||
foreach ($path as $i => $key) {
|
||||
if (is_numeric($key) && intval($key) > 0 || $key === '0') {
|
||||
$key = intval($key);
|
||||
if (is_numeric($key) && (int)$key > 0 || $key === '0') {
|
||||
$key = (int)$key;
|
||||
}
|
||||
if ($op === 'insert') {
|
||||
if ($i === $last) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue