• Resolved ojajo1231

    (@ojajo1231)


    Hi! I notice that plugin gave fatal error on dashboard comments page when commets have reply:

    Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in …/plugins/stars-rating/includes/class-stars-rating.php:140

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Fahid Javid

    (@fahidjavid)

    Hi,

    It seems like a PHP version-specific issue. What PHP version are you using on your website?

    Recommend PHP version is 7.4 or greater.

    Thanks,

    Fahid

    Thread Starter ojajo1231

    (@ojajo1231)

    It seems error will appear when PHP is greater than 8.

    Error with:

    • 8.0.30
    • 8.1.25
    • 8.2.12

    All was good with 7.4.33

    Plugin Author Fahid Javid

    (@fahidjavid)

    Okay, let me test and push an update if I could replicate the issue.

    Thanks

    I had a similar error also

    Error Details
    
    =============
    
    An error of type E_ERROR was caused in line 140 of the file /home/escortsnoir/public_html/wp-content/plugins/stars-rating/includes/class-stars-rating.php. Error message: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /home/escortsnoir/public_html/wp-content/plugins/stars-rating/includes/class-stars-rating.php:140
    
    Stack trace:
    
    #0 /home/escortsnoir/public_html/wp-content/plugins/stars-rating/includes/class-stars-rating.php(140): round('')
    
    #1 /home/escortsnoir/public_html/wp-content/plugins/stars-rating/admin/stars-rating-comments-column.php(71): Stars_Rating::get_rating_stars_markup('')
    
    #2 /home/escortsnoir/public_html/wp-includes/class-wp-hook.php(324): Stars_Rating_Comments_Column->display_rating_column_value('rating', '237')
    
    #3 /home/escortsnoir/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    
    #4 /home/escortsnoir/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    
    #5 /home/escortsnoir/public_html/wp-admin/includes/class-wp-comments-list-table.php(1118): do_action('manage_comments...', 'rating', '237')
    
    #6 /home/escortsnoir/public_html/wp-admin/includes/class-wp-list-table.php(1799): WP_Comments_List_Table->column_default(Object(WP_Comment), 'rating')
    
    #7 /home/escortsnoir/public_html/wp-admin/includes/class-wp-comments-list-table.php(671): WP_List_Table->single_row_columns(Object(WP_Comment))
    
    #8 /home/escortsnoir/public_html/wp-admin/includes/class-wp-list-table.php(1724): WP_Comments_List_Table->single_row(Object(WP_Comment))
    
    #9 /home/escortsnoir/public_html/wp-admin/includes/class-wp-list-table.php(1709): WP_List_Table->display_rows()
    
    #10 /home/escortsnoir/public_html/wp-admin/includes/class-wp-comments-list-table.php(604): WP_List_Table->display_rows_or_placeholder()
    
    #11 /home/escortsnoir/public_html/wp-admin/edit-comments.php(452): WP_Comments_List_Table->display()
    
    #12 {main}
    
      thrown
    Plugin Author Fahid Javid

    (@fahidjavid)

    Hi @ojajo1231 and @waynep16,

    Please update the plugin on your websites to the latest version 4.0.2 and this Fatal error will be fixed.

    Thanks,

    Fahid

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error on admin comments page when comments have reply’ is closed to new replies.