editing missing photo leads to unexpected error #540

Closed
opened 2026-10-05 00:03:02 +02:00 by adam · 0 comments
Owner

on admin.php?page=photo-1234 if photo 1234 does not exists, you get:

  Piwigo encountered an unrecoverable error.
  
  [mysql error 1064] 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 3
  
  SELECT username AS username
    FROM piwigo_users
    WHERE id = 
  ;
  
  #1	my_error include/dblayer/functions_mysqli.inc.php(147)
  #2	pwg_query admin/picture_modify.php(282)
  #3	include admin/photo.php(74)
  #4	include admin.php(302)
on admin.php?page=photo-1234 if photo 1234 does not exists, you get: ``` Piwigo encountered an unrecoverable error. [mysql error 1064] 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 3 SELECT username AS username FROM piwigo_users WHERE id = ; #1 my_error include/dblayer/functions_mysqli.inc.php(147) #2 pwg_query admin/picture_modify.php(282) #3 include admin/photo.php(74) #4 include admin.php(302) ``` <!-- github-sync-id:196927447 -->
adam closed this issue 2026-10-05 00:03:02 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#540