Skip to:
Content
Pages
Categories
Search
Top
Bottom

Getting an error when editing a post

  • @sbask

    Participant

    2025/03/12 22:03:38 [error] 740224#740224: *3087207 FastCGI sent in stderr: “PHP message: PHP Warning: A non-numeric value encountered in /home/askwoody/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-topic-replies-list-table.php on line 239; PHP message: PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /home/askwoody/public_html/wp-includes/functions.php:424
    Stack trace:
    #0 /home/askwoody/public_html/wp-includes/functions.php(424): number_format()
    #1 /home/askwoody/public_html/wp-admin/includes/class-wp-list-table.php(1042): number_format_i18n()
    #2 /home/askwoody/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-topic-replies-list-table.php(305): WP_List_Table->pagination()
    #3 /home/askwoody/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-topic-replies-list-table.php(263): BBP_Topic_Replies_List_Table->display_tablenav()
    #4 /home/askwoody/public_html/wp-content/plugins/bbpress/includes/admin/metaboxes.php(586): BBP_Topic_Replies_List_Table->display()
    #5 /home/askwoody/public_html/wp-admin/includes/template.php(1456): bbp_topic_replies_metabox()
    #6 /home/askwoody/public_html/wp-admin/edit-form-advanced.php(722): do_meta_boxes()” while reading response header from upstream, client: 50.211.96.14, server: askwoody.com, request: “GET /wp-admin/post.php?post=1964543&action=edit HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php8.2-fpm.askwoody.sock:”, host: “www.askwoody.com”

    I Think the error is being triggered by bbpress?

Viewing 1 replies (of 1 total)
  • @robin-w

    Moderator

    As a test, can you try

    add_filter ('bbp_get_topic_reply_count', 'rew_return_int', 10 , 2) ;
    
    function rew_return_int ($replies, $topic_id ) {
    return int($replies) ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    and let me know if it works

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar