Make WordPress Core


Ignore:
Timestamp:
02/13/2023 09:06:50 AM (22 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

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

    r51008 r55310  
    174174
    175175        $output = '$2a$';
    176         $output .= chr(ord('0') + $this->iteration_count_log2 / 10);
    177         $output .= chr(ord('0') + $this->iteration_count_log2 % 10);
     176        $output .= chr((int)(ord('0') + $this->iteration_count_log2 / 10));
     177        $output .= chr((ord('0') + $this->iteration_count_log2 % 10));
    178178        $output .= '$';
    179179
Note: See TracChangeset for help on using the changeset viewer.