if (!file_exists($local) || update_delete_file_if_stale($local)) {
return system_retrieve_file($url, $local, FALSE, FILE_EXISTS_REPLACE);
}
else {
return $local;
}
We'll never use the local cache of a remote file since update_delete_file_if_stale() is a void function.
The patch should:
- change update_delete_file_if_stale() to return TRUE if something is deleted and FALSE if not.
- update UpdateDeleteFileIfStaleTest to test the return value.
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Y | Instructions | |
Add automated tests (if possible) | Y | Instructions | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Y | Instructions |