Make WordPress Core


Ignore:
Timestamp:
08/25/2025 01:08:28 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Replace non-canonical scalar type casts with canonical versions.

PHP 8.5 deprecates four alternative scalar type names in favor of their canonical names:

  • booleanbool
  • doublefloat
  • integerint
  • binarystring

References:

Follow-up to [1346], [11875].

Props TobiasBg, swissspidy, SergeyBiryukov.
See #63061.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/IXR/class-IXR-message.php

    r59056 r60659  
    178178                break;
    179179            case 'double':
    180                 $value = (double)trim($this->_currentTagContents);
     180                $value = (float)trim($this->_currentTagContents);
    181181                $valueFlag = true;
    182182                break;
     
    197197                break;
    198198            case 'boolean':
    199                 $value = (boolean)trim($this->_currentTagContents);
     199                $value = (bool)trim($this->_currentTagContents);
    200200                $valueFlag = true;
    201201                break;
Note: See TracChangeset for help on using the changeset viewer.