Experiencing an error due to some line in my functions file. Cannot understand what the problem is

[ad_1]

Symptoms are: Can’t access articles edition in any form. (403 error).

Debug log gives the following line:

[23-Aug-2022 22:34:40 UTC] PHP Notice: A non well formed numeric value encountered in /home/marcwif/www/wp-includes/functions.php on line 425

This is what the line 425 looks like:

$formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format[‘decimal_point’], $wp_locale->number_format[‘thousands_sep’] );

Could someone point me to appropriate resources or help me with that ?

[ad_2]
4 Comments
  1. The `$number` variable is not always a number so try casting it to one to be certain so try `(int) $number`

  2. Warnings like that do not cause 403 errors – Not typically anyway. So that’s likely a separate issue.

    The line from your functions.php looks fine, so one of the variables (the things with $ in front) gets the wrong data somehow.

  3. The error is inside wp-includes …. This is a core file the error is coming from some other place .. check which file of wp-content is causing the issue …

    If there is a stack trace of the error check for a file from themes or plugin that is causing this issue ….

  4. A “PHP Notice” is not an error, it’s a notice. Something else is causing the image upload issue. Enable [WP_DEBUG_LOG]), then look at the debug.log file it creates in /wp-content/

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer