class-wp-hook.php Throwing Errors on PHP 8.1
-
Getting the following errors:
[17-Jan-2023 04:36:59 UTC] PHP Deprecated: Implicit conversion from float 10.1 to int loses precision in /public_html/wp-includes/class-wp-hook.php on line 79 [17-Jan-2023 04:36:59 UTC] PHP Deprecated: Implicit conversion from float 10.1 to int loses precision in /public_html/wp-includes/class-wp-hook.php on line 77
Here is the code that it’s flagging:
$priority_existed = isset( $this->callbacks[ $priority ] ); $this->callbacks[ $priority ][ $idx ] = array(
I was able to get rid of the error by doing the following:
$priority_existed = isset( $this->callbacks[ (int) $priority ] ); $this->callbacks[ (int) $priority ][ $idx ] = array(
My question is, has anyone else experienced the following error? Just trying to pin point if it’s an issue with my website or it’s a WP glitch with 8.1
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘class-wp-hook.php Throwing Errors on PHP 8.1’ is closed to new replies.