Posted by chirale on July 23, 2009 at 3:34pm
Jump to:
| Project: | Upload previews |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
Same as #179378: Attempt to assign property of non-object in (error on preview), but on Drupal 6. Maybe you can port the patch used there.
| Attachment | Size |
|---|---|
| upload_preview_bug_1248363191939.jpg | 15.85 KB |
Comments
#1
upload_preview.module
change line 150
from
<?php$node->content['files']['#files'][$fid]->preview = module_invoke_all('upload_preview', $file);
?>
to
<?phpif (is_object($node->content['files']['#files'][$fid])) { $node->content['files']['#files'][$fid]->preview = module_invoke_all('upload_preview', $file);}
?>
#2