Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296210

update_delete_file_if_stale() must return a value or update_manager_file_get() will always fetch remote files

$
0
0
  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.
Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Create a patchYInstructions
Add automated tests (if possible)YInstructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsYInstructions

Viewing all articles
Browse latest Browse all 296210

Trending Articles