- Issue created by @ransomweaver
- Merge request !18Prevent php fatal error if $route_name is null β (Open) created by Unnamed author
This error is flooding my dblog, but it doesn't seem to result in any failure of function by the module:
TypeError: str_ends_with(): Argument #1 ($haystack) must be of type string, null given in str_ends_with() (line 274 of /var/www/html/docroot/modules/contrib/mercury_editor_live_edit/src/MercuryEditorLiveEditModuleHandler.php)
line 274 is
elseif (str_ends_with($route_name, '.mercury_editor_preview')) {
So $route_name is null. this function returns false meaning "don't attach the live editor to this field" then I think the easy fix is to just check if $route_name is null and return false. I will make an MR with such code.
Active
1.0
Code