From 48ef6d1c2becbf1e52f2ef773a2d48a68e945685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20W=C3=BCnsch?= Date: Tue, 16 Jun 2026 16:34:41 +0200 Subject: [PATCH] External Libraries: Replace `is_double()` and `is_long()` aliases ahead of PHP 8.6. The PHP 8.6 "Deprecations for PHP 8.6" RFC proposes deprecating the legacy type-check aliases `is_double()`, `is_integer()`, and `is_long()` in favor of their canonical counterparts, with removal targeted for PHP 9. Replace the two occurrences in bundled libraries that are maintained in core: `is_double()` becomes `is_float()` in the IXR `IXR_Value::calculateType()` method, and `is_long()` becomes `is_int()` in the PEMFTP `ftp_base::SetServer()` method. Behavior is unchanged; the canonical functions are exact equivalents. The remaining `is_integer()` usage lives in getID3 and has been fixed upstream; it will be picked up with the next library release. --- src/wp-admin/includes/class-ftp.php | 2 +- src/wp-includes/IXR/class-IXR-value.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-ftp.php b/src/wp-admin/includes/class-ftp.php index 20adc9f6bb39e..4e1a1d7b844e1 100644 --- a/src/wp-admin/includes/class-ftp.php +++ b/src/wp-admin/includes/class-ftp.php @@ -278,7 +278,7 @@ function Passive($pasv=NULL) { } function SetServer($host, $port=21, $reconnect=true) { - if(!is_long($port)) { + if(!is_int($port)) { $this->verbose=true; $this->SendMSG("Incorrect port syntax"); return FALSE; diff --git a/src/wp-includes/IXR/class-IXR-value.php b/src/wp-includes/IXR/class-IXR-value.php index 20c205d128580..850f318f2c6b2 100644 --- a/src/wp-includes/IXR/class-IXR-value.php +++ b/src/wp-includes/IXR/class-IXR-value.php @@ -47,7 +47,7 @@ function calculateType() if (is_int($this->data)) { return 'int'; } - if (is_double($this->data)) { + if (is_float($this->data)) { return 'double'; }