fixing error of line 51 of galleryImage.php