Problem
Booting the Shop site through WP-CLI on PHP 8.4 repeatedly emits:
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in inc/middleware/route-affinity.php on line 166
Reproduction:
wp --path=/var/www/extrachill.com --url=shop.extrachill.com eval 'echo get_current_blog_id();'
The warning repeats for route registrations whose method/affinity input is null.
Expected
Normalize the nullable input to a string or reject it before strtolower() without changing valid route-affinity behavior. Add coverage for null/missing route metadata on PHP 8.4.
Problem
Booting the Shop site through WP-CLI on PHP 8.4 repeatedly emits:
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in inc/middleware/route-affinity.php on line 166Reproduction:
wp --path=/var/www/extrachill.com --url=shop.extrachill.com eval 'echo get_current_blog_id();'The warning repeats for route registrations whose method/affinity input is null.
Expected
Normalize the nullable input to a string or reject it before
strtolower()without changing valid route-affinity behavior. Add coverage for null/missing route metadata on PHP 8.4.