Invalid numeric argument to getGalleryDetails()