From 5ea4666f2d5b17180bfcf182205a14f59c2845c3 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 13 Feb 2023 09:08:23 +0000 Subject: [PATCH] External Libraries: Prevent a PHP 8.1 deprecation notice in `PasswordHash::gensalt_blowfish()`. This changeset uses an `(int)` cast to prevent a PHP 8.1 deprecation notice for "Implicit conversation from float to int loses precision" in `PasswordHash::gensalt_blowfish()`. Props hanshenrik, jrf, desrosj, costdev. Fixes #56340. Built from https://develop.svn.wordpress.org/trunk@55310 git-svn-id: http://core.svn.wordpress.org/trunk@54843 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-phpass.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-phpass.php b/wp-includes/class-phpass.php index 5411b36483..055925b20f 100644 --- a/wp-includes/class-phpass.php +++ b/wp-includes/class-phpass.php @@ -173,8 +173,8 @@ class PasswordHash { $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $output = '$2a$'; - $output .= chr(ord('0') + $this->iteration_count_log2 / 10); - $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= chr((int)(ord('0') + $this->iteration_count_log2 / 10)); + $output .= chr((ord('0') + $this->iteration_count_log2 % 10)); $output .= '$'; $i = 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index be28350a99..11c9d66aa3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta1-55309'; +$wp_version = '6.2-beta1-55310'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.