When I try to add a new node using node.save I receive the message:
Attempt to assign property of non-object in /home/server/public_html/sites/all/modules/services/services/node_service/node_service.inc on line 148.
Solved using:
if(!edit->uid && edit->uid!=NULL) instead of if(!edit->uid)
I'm not really sure that this is correct. any clue about this error?.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 710590.patch | 1.07 KB | gdd |
| #6 | 710590.patch | 851 bytes | gdd |
| #4 | services-710590.patch | 785 bytes | solipsist |
Comments
Comment #1
P.Smith commentedI'm having a problem creating a node, too, with node.save.
I should have thought more about this before. $edit is an array ($user is an object so don't change anything with that) but in this part it is being treated as an object. Code change needed:
Comment #2
robin van emden commentedI can confirm that this code change is both needed and that the change works. Rather a show-stopper, maybe mark this one critical?
Comment #3
un11imig commentedOk, I put this as critical.
Comment #4
solipsist commentedAttaching patch file.
Comment #6
gddNot sure why that last patch failed, but I just rolled this one. Lets see if its ok.
Comment #7
BillyMG commentedAnd here I was about to file a new issue with my patch for it when I suddenly found this issue. The only difference with my patch is that I also changed line 153:
After all, there's no sense in casting it again, not that it really matters other than being confusing. Other than that, I can confirm that this patch worked for me.
Comment #8
gddGood catch, here's a reroll
Comment #9
waldmanm commentedJust ran into this problem with 2.0-beta1, applied the patch in #8, and can confirm it solves the problem.
Comment #10
gddCommited, thanks everyone.