Closed
Description
opened on Dec 10, 2022
I don't know if this is a valid bug because I'm not sure what the minimum requirements of this plugin are really supposed to be. The readme specifies PHP 5.6, and class-webfinger.php is the only place I can find a reference to str_contains. So my best theory is that this was an unintended side-effect of the fix to #152. I'm either saying that this code should be made backwards-compatible, or that the readme or other documentation should be clarified. I just don't know which.
Anyway. I access this URL on an internal test machine:
https://test1-wordpress.fritz.box/index.php?rest_route=/activitypub/1.0/webfinger&resource=acct:test@test1-wordpress.fritz.box
And I get:
Fatal error: Uncaught Error: Call to undefined function str_contains() in /srv/wordpress/test_wordpress/wp-content/plugins/activitypub/includes/rest/class-webfinger.php:47 Stack trace: #0 /usr/share/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1139): Activitypub\Rest\Webfinger::webfinger() #1 /usr/share/wordpress/wp-includes/rest-api/class-wp-rest-server.php(985): WP_REST_Server->respond_to_request() #2 /srv/wordpress/test_wordpress/wp-content/plugins/activitypub/includes/rest/class-server.php(22): WP_REST_Server->dispatch() #3 /usr/share/wordpress/wp-includes/rest-api/class-wp-rest-server.php(412): Activitypub\Rest\Server->dispatch() #4 /usr/share/wordpress/wp-includes/rest-api.php(354): WP_REST_Server->serve_request() #5 /usr/share/wordpress/wp-includes/class-wp-hook.php(292): rest_api_loaded() #6 /usr/share/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #7 /usr/share/wordpress/wp-includes/plugin.php(551): WP_Hook->do_action() #8 /usr/share/wordpress/wp-includes/class-wp.php(388): do_a in /srv/wordpress/test_wordpress/wp-content/plugins/activitypub/includes/rest/class-webfinger.php on line 47`
This is on Raspbian 11. PHP 7.4. Apache 2.4.54. Wordpress 5.7.5. If any of those things are not compatible, it probably should be made more clear in the readme.
Metadata
Assignees
Labels
No labels
Activity