Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I upload a flexinode with image fields and they're empty I get an error:
# warning: Attempt to assign property of non-object in C:\apachefriends\xampp\htdocs\searcy\modules\flexinode\field_image.inc on line 47.
# warning: Attempt to assign property of non-object in C:\apachefriends\xampp\htdocs\searcy\modules\flexinode\field_image.inc on line 48.
It looks like empty image fields aren't being handled and it's causing errors. It seems like a bug like this would have been fixed ages ago so I'm wondering if I've done something wrong. I've tried this in 4.7 and CVS.
Comments
Comment #1
mo6Lines 47 and 48 in function flexinode_field_image_insert need to have a test, like:
Comment #2
mo6The error occurs in php5, I've never seen it with php4.
Comment #3
serval-1 CreditAttribution: serval-1 commentedI ran into the same error. This solution made the warnings to disappear.
Thank you, George!
Comment #4
Bèr Kessels CreditAttribution: Bèr Kessels commenteddupe of http://drupal.org/node/71026
sidenote: don't set status to 'patch' if there is no patch attached. copy-pasting PHP code in the issue is not the same as a patch.