Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

PHP Warning: Array to string conversion in /class-linkbacks-mf2-handler.php #263

Open
edent opened this issue Nov 20, 2022 · 4 comments
Open

Comments

@edent
Copy link

edent commented Nov 20, 2022

Since upgrading to PHP 8.1, I've noticed a couple of these warnings popping up:

PHP Warning: Array to string conversion in /blog/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php on line 354

$properties[ $key ] = array_unique( $properties[ $key ] );

@edent
Copy link
Author

edent commented Nov 21, 2022

Also seeing

PHP Warning: Undefined array key "type" in /blog/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php on line 454

And

PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /blog/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php:185

@edent
Copy link
Author

edent commented Nov 24, 2022

PHP Warning: Attempt to read property "comment_ID" on null in /blog/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-handler.php on line 421

return get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_canonical', true );

@bdeshi
Copy link

bdeshi commented Feb 5, 2023

getting a fatal error. cc @pfefferle

semantic-linkbacks v3.12.0
wordpress v6.1.1
php 8.1.14

[05-Feb-2023 18:16:08 UTC] PHP Fatal error:  Uncaught TypeError: array_intersect(): Argument #2 must be of type array, string given in /bitnami/wordpress/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php:592
Stack trace:
#0 /bitnami/wordpress/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php(592): array_intersect()
#1 /bitnami/wordpress/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php(164): Linkbacks_MF2_Handler::get_representative_entry()
#2 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): Linkbacks_MF2_Handler::generate_commentdata()
#3 /opt/bitnami/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#4 /bitnami/wordpress/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-handler.php(202): apply_filters()
#5 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): Linkbacks_Handler::enhance()
#6 /opt/bitnami/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#7 /opt/bitnami/wordpress/wp-includes/comment.php(2563): apply_filters()
#8 /bitnami/wordpress/wp-content/plugins/webmention/includes/class-webmention-receiver.php(375): wp_update_comment()
#9 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1171): Webmention_Receiver::post()
#10 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request()
#11 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch()
#12 /opt/bitnami/wordpress/wp-includes/rest-api.php(410): WP_REST_Server->serve_request()
#13 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): rest_api_loaded()
#14 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#15 /opt/bitnami/wordpress/wp-includes/plugin.php(565): WP_Hook->do_action()
#16 /opt/bitnami/wordpress/wp-includes/class-wp.php(399): do_action_ref_array()
#17 /opt/bitnami/wordpress/wp-includes/class-wp.php(780): WP->parse_request()
#18 /opt/bitnami/wordpress/wp-includes/functions.php(1332): WP->main()
#19 /opt/bitnami/wordpress/wp-blog-header.php(16): wp()
#20 /opt/bitnami/wordpress/index.php(17): require('...')
#21 {main}
  thrown in /bitnami/wordpress/wp-content/plugins/semantic-linkbacks/includes/class-linkbacks-mf2-handler.php on line 592

@dshanske
Copy link
Collaborator

dshanske commented Feb 5, 2023

Plugin scheduled for retirement in favor of a merge with Webmention in v5.0 very soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants