Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ezcomponents/Database/src/sqlabstraction/query.php on line 232
Warning shows up then generating query like this :
SELECT
`lh_gallery_images`.`pid`,
`lh_gallery_images`.`aid`,
`lh_gallery_images`.`filepath`,
`lh_gallery_images`.`filename`,
`lh_gallery_images`.`filesize`,
`lh_gallery_images`.`total_filesize`,
`lh_gallery_images`.`pwidth`,
`lh_gallery_images`.`pheight`,
`lh_gallery_images`.`hits`,
`lh_gallery_images`.`ctime`,
`lh_gallery_images`.`owner_id`,
`lh_gallery_images`.`pic_rating`,
`lh_gallery_images`.`votes`,
`lh_gallery_images`.`title`,
`lh_gallery_images`.`caption`,
`lh_gallery_images`.`keywords`,
`lh_gallery_images`.`pic_raw_ip`,
`lh_gallery_images`.`approved`,
`lh_gallery_images`.`mtime`,
`lh_gallery_images`.`comtime`,
`lh_gallery_images`.`sort_rated` FROM `lh_gallery_images`
INNER JOIN ( SELECT pid FROM lh_gallery_images ORDER BY comtime DESC, pid DESC LIMIT 20 OFFSET 20 ) AS items
ON lh_gallery_images.pid = items.pid
Environment:
Operating System:
PHP Version: (5.3.1)
Database and version: 5.1 mysql
Browser (and version):
I think issue is in $q->alias( $q2, 'items' ) statement. Witch is eZ Components valid, only perhaps to fancy. Not sure that i should consider this as eZ Components bug or as programming logical bug, like there is no other issues running this query.