• Hello,

    There are too many error lines found in the error_log file regarding this issue as follows:

    [10-Sep-2020 00:08:03 UTC] PHP Warning: A non-numeric value encountered in /home/public_html/wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php on line 378

    So, the solution is to replace this:

    $val = $oldval + $val;

    With this:

    $val = ((int)$oldval + (int)$val);

    Thanks

    • This topic was modified 4 years, 2 months ago by jodyshop.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • I agree.
    I also meet such warning.
    It is because $oldval has empty string ” if the post is newly published and nobody favorited it yet.
    This has to be fixed.

Viewing 1 replies (of 1 total)
  • The topic ‘How to fix: PHP Warning: A non-numeric value encountered.’ is closed to new replies.