Loading...
 
Skip to main content

tiki-list_gallery.php gives lots of warnings and a db-error when passing a non-existant gallery-id

Status
Closed
Subject
tiki-list_gallery.php gives lots of warnings and a db-error when passing a non-existant gallery-id
Version
1.9.x
Category
  • Error
Feature
Image Gallery
Resolution status
Fixed or Solved
Submitted by
amette
Rating
(0)
Description

browse to
tiki-list_gallery.php?galleryId=<my-unbelievably-high-galleryId>
and you'll get:

Notice: Undefined index: sortorder in /tiki-list_gallery.php on line 182

Notice: Undefined index: sortdirection in /tiki-list_gallery.php on line 182

Warning: mysql error: Unknown column '' in 'order clause' in query:
select i.`path` ,i.`imageId`,i.`name`,i.`description`,i.`created`,
d.`filename`,d.`filesize`,d.`xsize`,d.`ysize`,
i.`user`,i.`hits`
from `tiki_images` i , `tiki_images_data` d
where i.`imageId`=d.`imageId`
and d.`type`=?
and i.`galleryId`=?
order by `` desc

in /lib/tikidblib.php on line 134

Solution

Perhaps best to check for the existence of the gallery?
Then give a nice error message in the error.tpl



done.

redflo

Importance
6
Priority
30
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
370
Created
Saturday 08 October, 2005 19:45:17 UTC
by Unknown
LastModif
Friday 21 October, 2005 21:13:53 UTC


Show PHP error messages