Reviewed & tested by the community
Project:
Upload path
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2008 at 21:15 UTC
Updated:
19 Apr 2012 at 06:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
Mark Theunissen commentedConfirmed. The following line is the culprit:
$file is an object when reverting revisions, thus the error. Assuming that the logic in the comment is correct, we can safely add a further check to make sure that it's an array:
Patch attached.
Comment #2
lifepillar commentedI confirm that your patch fixes the problem (Drupal 6.10).
Comment #3
gourley commentedThis problem also occurs with the workflow module when you try to change the state of a node with a file attached to it and upload path enabled. The patch fixes it in that case as well (Drupal 6.10).
Comment #4
markj commentedI can confirm it works with revisions created by node_save(), eg,
Comment #5
dugh commentedsubscribe
Comment #6
NoRandom commentedIt also solves the problem with Workflow 6.x-1.1.
Comment #7
berliner commentedsubscribe
Comment #8
ChemAli commentedThis problem also occurs with the Fasttoggle module when you try to change the state of a node and UploadPath enabled. The patch fixes it in that case as well (Drupal 6.13).
Comment #9
miro_dietikerSo nothing dangerous here. Patch looks fine and seems rtbc to me.
Comment #10
agileware commentedPatch works for me too.
Here is a new version of the patch that applies cleanly to 6.x-1.x-dev
and doesn't have the unnecessary line changes from the original patch.
Also, when it was happening for me it was not related to revisions at all. - So changing title
Note that in the current dev version the error is on is line 39.
Comment #11
agileware commentedAny chance this small patch can be committed, it's been a while and is still a problem.
Cheers!
Comment #12
mradcliffeRan into this issue as well while doing some node_save() on a $node object in a custom module.
Patch works for me.
Comment #13
xurubo93 commentedPlease commit this patch.
regards
Comment #14
Michel Poulain commentedPlease commit this patch! It works for me too.