PHP Warning: Attempt to read property "comment_post_ID" on null
edent opened this issue · 1 comments
edent commented
PHP Fatal error: Uncaught ErrorException: Attempt to read property "comment_post_ID" on null in /blog/wp-includes/comment-template.php:794
Stack trace:
#0 /blog/wp-includes/comment-template.php(794): {closure}()
#1 /blog/wp-content/plugins/webmention/includes/class-receiver.php(436): get_comment_link()
#2 /blog/wp-includes/rest-api/class-wp-rest-server.php(1230): Webmention\Receiver::post()
#3 /blog/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request()
#4 /blog/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()
#5 /blog/wp-includes/rest-api.php(428): WP_REST_Server->serve_request()
#6 /blog/wp-includes/class-wp-hook.php(324): rest_api_loaded()
#7 /blog/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /blog/wp-includes/plugin.php(565): WP_Hook->do_action()
#9 /blog/wp-includes/class-wp.php(418): do_action_ref_array()
#10 /blog/wp-includes/class-wp.php(813): WP->parse_request()
#11 /blog/wp-includes/functions.php(1336): WP->main()
#12 /blog/wp-blog-header.php(16): wp()
#13 /blog/index.php(17): require('/home/openbenc/...')
#14 {main}
thrown in /blog/wp-includes/comment-template.php on line 794
Seems to be part of
wordpress-webmention/includes/class-receiver.php
Lines 435 to 442 in 0259d51
I'm not sure how to trace which comment is causing it. Perhaps another null check is needed?
edent commented
Ignore me. I've got a function to auto-delete likes and reposts. After it fires, the receiver has nothing to work with.