[wp-trac] [WordPress Trac] #61681: PHP Fatal error: Uncaught Error: Object of class WP_Comment could not be converted to string
WordPress Trac
noreply at wordpress.org
Wed Jul 17 17:34:02 UTC 2024
#61681: PHP Fatal error: Uncaught Error: Object of class WP_Comment could not be
converted to string
--------------------------+-----------------------------
Reporter: ambrosiawt | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 6.6
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Error message is: PHP Fatal error: Uncaught Error: Object of class
WP_Comment could not be converted to string in /var/web/site/public_html
/wp-includes/comment-template.php:27
The problem appears to be that in some cases, code in comment-template.php
is calling get_comment_author() in comment-template.php which expects an
optional parameter that is used as the comment_ID but is being passed a
WP_Comment object instead at times. Discovered the issue when trying to
edit a Divi template and the builder hung, and found the errors in the
log. I do have a proposed patch attached.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61681>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list