Notice: Trying to get property of non-object in image_approval_save_upload_file() (line 153 of /home/d2qhw/www/sites/default/modules/image_approval/image_approval.module).
Notice: Trying to get property of non-object in image_approval_save_upload_file() (line 158 of /home/d2qhw/www/sites/default/modules/image_approval/image_approval.module).
Recoverable fatal error: Argument 1 passed to file_move() must be an instance of stdClass, string given, called in /home/d2qhw/www/sites/default/modules/image_approval/image_approval.module on line 161 and defined in file_move() (line 1051 of /home/d2qhw/www/includes/file.inc).

It appears to fail horribly if no image is actually submitted. Even if an image has already been approved. Obviously this isn't a good thing.

Comments

RedEight created an issue. See original summary.

redeight’s picture

StatusFileSize
new896 bytes

Possible fix.

redeight’s picture

Status: Active » Needs work

The submitted patch, while it stops the error, appears to break the module's functionality. Anyone have any ideas why?

redeight’s picture

Status: Needs work » Needs review
StatusFileSize
new896 bytes

Found and fixed the issue.

prethiee’s picture

Status: Needs review » Patch (to be ported)

Thanks for the patch RedEight.

  • PertFayonner committed 75cce33 on 7.x-1.x
    Issue #2916656 by PertFayonner,RedEight: Fix for error thrown when no...

  • PertFayonner committed 0eb6499 on 7.x-1.x
    Revert "Revert "Revert "Issue #2916656 by PertFayonner,RedEight: Fix for...
  • PertFayonner committed 32fd9fc on 7.x-1.x
    Revert "Issue #2916656 by PertFayonner,RedEight: Fix for error thrown...
  • PertFayonner committed 438be23 on 7.x-1.x
    Revert "Revert "Issue #2916656 by PertFayonner,RedEight: Fix for error...
  • PertFayonner committed bb8e231 on 7.x-1.x
    Revert "Issue #2916656 by PertFayonner,RedEight: Fix for error thrown...
  • PertFayonner committed f9b337e on 7.x-1.x
    Revert "Revert "Issue #2916656 by PertFayonner,RedEight: Fix for error...

  • PertFayonner committed 3fb9f3c on 7.x-1.x
    Issue #2916656 by pertfayonner,redeight: Fix for error thrown when no...
prethiee’s picture

Status: Patch (to be ported) » Fixed

The issue has been fixed in the current version.

Status: Fixed » Closed (fixed)

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