Active
Project:
File Cache
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2018 at 13:06 UTC
Updated:
25 Feb 2018 at 13:06 UTC
Jump to comment: Most recent
Before storing cache data it checks filecache_is_readdeleteonly() and if true the cache in question is deleted to invalidate any existing record that might have been created. But there is an error in the function which means the cache is always deleted when it's being set from a CLI script (including when running the cron via Drush).
I think following the line should be an AND rather than an OR:
substr(php_sapi_name(), 0, 3) == "cli" || (extension_loaded('posix') && posix_getuid() == 0)
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| Only_delete_in_CLI_mode_if_running_as_root_PHP.patch | 570 bytes | edjeavons |
Comments