Skip to content

Commit 1cfe153

Browse files
authored
IXR: Replace double and boolean casts with float and bool
PHP 8.5 deprecates non-canonical scalar type casts (boolean|double|integer|binary). Therefore, their canonical versions should be used. See https://php.watch/versions/8.5/boolean-double-integer-binary-casts-deprecated.
1 parent a291462 commit 1cfe153

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/IXR/class-IXR-message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function tag_close($parser, $tag)
177177
$valueFlag = true;
178178
break;
179179
case 'double':
180-
$value = (double)trim($this->_currentTagContents);
180+
$value = (float)trim($this->_currentTagContents);
181181
$valueFlag = true;
182182
break;
183183
case 'string':
@@ -196,7 +196,7 @@ function tag_close($parser, $tag)
196196
}
197197
break;
198198
case 'boolean':
199-
$value = (boolean)trim($this->_currentTagContents);
199+
$value = (bool)trim($this->_currentTagContents);
200200
$valueFlag = true;
201201
break;
202202
case 'base64':

0 commit comments

Comments
 (0)