![]() |
|
Possible problem in checkPagePassword function? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Possible problem in checkPagePassword function? (/thread-6943.html) |
Possible problem in checkPagePassword function? - Blue Dragonfly - 2010-04-23 I have an unpulbished page that is linked via a hard-coded URL in my theme template, for "Privacy Info". I just noticed that when I am not logged in and try to view that page, I get this error: ` Zenphoto encountered an error MySQL Query ( SELECT 'titlelink' FROM 'zp_zenpage_pages' WHERE 'id'= ) failed. MySQL returned the error 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 '' at line 1 ` Thisis the query in the function checkPagePassword in zenpage-template-functions.php. Since this page has no parent ID (null in database), this query fails. Before I reported this in the tracker, I wanted to make sure I had my information correct on this. The error only happens when I am NOT logged in, presumably this check is not made for administrators. Should this function be checking for a null parent ID? |