Closed (cannot reproduce)
Project:
Drupal core
Version:
7.41
Component:
file system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2015 at 15:51 UTC
Updated:
23 Oct 2015 at 15:14 UTC
Jump to comment: Most recent
Comments
Comment #3
David_Rothstein commentedI can't reproduce any problem here -
theme('file_icon', array('file' => file_load(1)))works fine for me with no PHP notices (assuming there's an actual file on the site with ID = 1).That's because the default values of these variables are defined in hook_theme() (see http://cgit.drupalcode.org/drupal/commit/?id=830fdea).
Did you forget to run update.php (or at least clear caches) after updating your site to the latest Drupal core version?
Comment #4
tatarbjHi @David_Rothstein,
i've checked our cluster and actually because we still using 7.39 with only the security updates from the last two versions of drupal (don't ask why...), the changes are not applied there, maybe it is the reason why i realised this issue on our systems. The message was this: Notice: Undefined index: alt in theme_file_icon() (line 800 of /.../modules/file/file.module). This message was pointing to the first usage of $variables['alt'] that's why when i've checked the code i thought it can be the solution, but you're right because it is already defined in hook_theme() it shouldn't be an issue.
Comment #5
pfrenssen@tatarbj thanks for the clarification!