You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make modNamespace's translatePath method null-safe (#16763)
### What does it do?
Replaces NULL `$path` with empty string.
### Why is it needed?
The `str_replace` fn no longer quietly allows a null value to be passed
to its subject param. Deprecation notices show in php logs when null is
passed in php 8.1+.
### How to test
1. Change a namespace's core or assets path to NULL via sql query.
2. Observe the php logs after clearing modx's cache (before loading this
PR); you should see the deprecation notice(s).
3. Load the PR and clear cache again. There should be no deprecation
notices (of the type seen in step 2).
### Future Consideration
This could also be avoided by altering the _path_ and _assets_path_
columns in the namespaces table to be not null with default of empty
string.
### Related issue(s)/PR(s)
No related issue.
0 commit comments