Commit c1a1076e authored by dopry's avatar dopry

establish a default value for files as a files array with all empty or 0 valued elements.

parent 0fb5d1f1
......@@ -21,8 +21,9 @@ function field_file_load($fid, $reset = NULL) {
}
if (empty($fid)) {
return array();
return array('fid' => 0, 'filepath' => '', 'filename' => '', 'filemime' => '', 'filesize' => 0);
}
$files = _field_file_cache();
// Serve file from internal cache if available.
......@@ -35,7 +36,7 @@ function field_file_load($fid, $reset = NULL) {
}
if (!$file) {
return array();
$file = array('fid' => 0, 'filepath' => '', 'filename' => '', 'filemime' => '', 'filesize' => 0);
}
foreach (module_implements('file_load') as $module) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment