I'm getting an error when a user who does not have either 'administer files' or 'add media from remote urls' attempts to open the media browser dialog. When the user does not have access, remote_stream_wrapper_media_browser_plugin_view() returns null. This causes an error in media_browser when it attempts to append the result to an array.

At some point, the default "return array();" was dropped from the end of the function. My patch adds it back in—this seems to be what other media browser plugins do.

patch to follow...

CommentFileSizeAuthor
#1 return_array-1621568-1.patch324 bytescleaver

Comments

cleaver’s picture

StatusFileSize
new324 bytes
dave reid’s picture

I believe updating to a recent release of Media should actually fix this.

cleaver’s picture

Status: Active » Closed (works as designed)

Thanks, we're on an older patched version of media for now, but it looks like the following patch to media would solve the problem:

http://drupalcode.org/project/media.git/commitdiff/a820a49c99ab7d65d87de...