Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
dblog.module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Sep 2021 at 23:50 UTC
Updated:
18 Oct 2021 at 09:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottHere's the fix from the meta.
Comment #3
alexpottComment #4
daffie commentedThe value of $uri goes into a
preg_match()function as the second parameter (in the methodisValid()) and that must be a string in PHP 8.1.Looks good to me.
Comment #5
catch::createLink() is only called in two places, can we fix the callers instead?
Comment #6
dagmarI think the approach in #3 is correct, given this is a bad use of the UrlHelper::isValid API (which expects a string). Also the method still does what the documentation of that method says it does.
But also inspecting the code of the UrlHelper there are other examples of methods that expect a string but does not specify the full type-hint. I guess this is what is discussed here #3050720: [Meta] Implement strict typing in existing code
Comment #7
andypost@catch +1 RTBC as this protected method expects to deal with NULL as it documents in its doc-block
Comment #9
catchOK, fair enough.
Committed 09cf315 and pushed to 9.3.x. Thanks!