Change system_retrieve_file function to return error instead of generating Drupal messages

Created on 20 January 2014, almost 11 years ago
Updated 23 June 2023, over 1 year ago

https://api.drupal.org/api/drupal/core!modules!system!system.module/func...

Currently the function system_retrieve_file generates a variety of Drupal error messages that cannot be suppressed or otherwise modified. This function should probably be modified to return the error to the calling function, allowing that function to determine what happens on an error instead of making an assumption on how errors should be handled.

With the way this is currently developed, it makes using this function for batch imports or other automated systems difficult without clearing all Drupal messages after executing the function. Furthermore, there is no easy way to programmatically determine why this function fails (ie, 404, 403).

πŸ“Œ Task
Status

Closed: outdated

Version

9.5

Component
SystemΒ  β†’

Last updated 2 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024