Get a warning when the image_attach is used in a view that has no results
| Project: | Image |
| Version: | 6.x-1.0-beta3 |
| Component: | image_attach |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
* warning: implode() [function.implode]: Invalid arguments passed in C:\xampp\htdocs\TTT\sites\all\modules\image\contrib\image_attach\image_attach_views_handler_field_attached_images.inc on line 73.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY weight' at line 1 query: SELECT nid, iid FROM image_attach WHERE nid IN () ORDER BY weight in C:\xampp\htdocs\TTT\sites\all\modules\image\contrib\image_attach\image_attach_views_handler_field_attached_images.inc on line 74.
When my view has no results I get this warning.
It should be fixed very easy the implode should not be called if there are no nids.
| Attachment | Size |
|---|---|
| image_attache_warning.JPG | 89.46 KB |

#1
Thanks for reporting this bug.
Please could you test this patch?
#2
I tested the patch, and it resolved the problem for me. Thanks!
[Drupal 6.14, Image 6.x-1.0-beta3]
-- Sara
#3
Patch committed to CVS; this will be available in the dev version shortly.
Thank you for testing :)
#4
thank you very much.
#5
I tried applying the patch using ... patch < file.patch but I'm getting the error "Only garbage was found in the patch input." I'm using the dev version. This is the firrst patch I'm applying, I'm sure I'm doing something wrong... Any ideas?
#6
I've committed the patch, so there is no need for you to apply it.
When I say 'shortly', I mean when the CVS bot gets round to it, which is a matter of hours -- so it's in the dev version by now.
You can always check CHANGELOG file inside a download. That has a list of all changes, with the relevant issue number (in this case, for example, 592852).
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
Hi,
The patch is effective. Thanks.
#9
I'm afraid I really don't follow the last comment.
Please try with the latest dev release.
#10
Thanks. Everything is OK now. The correction about this bug is working well