Closed (fixed)
Project:
Links Package
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
18 Feb 2006 at 05:06 UTC
Updated:
6 Mar 2006 at 17:00 UTC
Steps to reproduce:
Enable the links and weblink module and then immediately click on the 'weblink' link. You'll receive the error:
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 ') AND n.type='weblink' AND n.status=1 ORDER BY n.title' at line 1 query: SELECT DISTINCT n.nid, n.title FROM node n, term_node tn WHERE n.nid=tn.nid AND tn.tid IN () AND n.type='weblink' AND n.status=1 ORDER BY n.title in includes\database.mysql.inc on line 118.
Here's a patch that just surrounds that code with an if (count($terms)) { ... } to ensure that there is at least one term available to use as an argument.
| Comment | File | Size | Author |
|---|---|---|---|
| links_weblink.module_1.patch | 1.38 KB | webchick |
Comments
Comment #1
Bèr Kessels commentedLook good. It fixes the bug. and does not introduce anything new.
Comment #2
syscrusher commentedI agree, Ber. Good patch, Webchick, and thanks. It's committed to CVS today.
Scott
Comment #3
(not verified) commented