Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Sep 2012 at 15:44 UTC
Updated:
15 Oct 2012 at 18:21 UTC
Jump to comment: Most recent file
The helper function _media_recursive_check_plain() is defined and used in media.browser.inc but is also used in media.media.inc. Unfortunately, it seems that media.browser.inc is not always loaded which can lead to errors, namely (when searching for files in the media browser):
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '_media_recursive_check_plain' not found or invalid function name in media_query_media_browser_alter() (line 55 of /Users/devin/Sites/acquia-drupal/sites/all/modules/media/media.media.inc).
The _media_recursive_check_plain() function should be moved out of media.browser.inc and into media.module where it will always be available.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | move-and-rename-function-1790448-1.patch | 2.12 KB | devin carlson |
Comments
Comment #1
devin carlson commentedA patch to move the function into media.module. I've also removed the leading underscore from the function name, as it doesn't really seem like a helper function since it is used in multiple locations.
Comment #2
grendzy commentedLooks good to me.
Comment #3
ParisLiakos commentedThanks, seems patch works, no more entries in dblog
Comment #4
ParisLiakos commentedcommited