I feel the attached patch should be applied. Otherwise attaching an image to a status (Drupal Statuses module) results in the following PHP error:

Fatal error: __clone method called on non-object in /
/httpdocs/sites/all/modules/token/token.tokens.inc on line 1403

CommentFileSizeAuthor
fbsmp-file_load-fix.patch422 bytesribakker
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

metakel’s picture

I have the same problem. I did suspect that was caused by the Token module and created this issue:
#2157995: PHP Fatal error: __clone method called on non-object

Now I think it should be the problem of this fbsmp module.

thirdender’s picture

Status: Active » Reviewed & tested by the community

I just had the same issue, and this patch definitely fixed the problem.

It looks like hook_file_load takes an array of file objects. When the hook was invoked and passed a single file it was causing issues in modules that implemented that hook.

metakel’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

The latest version of fbsmp still have the same problem. I suggest this patch should be committed to the coming releases.

mathankumarc’s picture

Priority: Major » Minor
Status: Patch (to be ported) » Fixed

Fixed the issue and committed to dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.