On PHP 7.4, when path_delete()
is called for an unaliased path, the following notice is given:
Notice: Trying to access array offset on value of type bool in path_delete() (line 480 of /code/profiles/aclu_affiliates/modules/contrib/redis/redis.path.inc).
This occurs because calls in the function, including one to redis_path_backend_get()->deleteAlias()
, are not conditional on the return value of path_load()
.
In commit 23b14e9 in
#3084980: Trying to access array offset on value of type null in path_delete() β
this issue was fixed in the core version of path_delete()
from which the Redis module's version was originally copied.
The fix here is to sync with the corresponding code in core. For ease of comparing the two path_delete()
methods in future, also bring in coding style changes from the core version.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.