Update GalleryHelper.php

Fixes to adhere to STRICT.