Skip to content

Commit

Permalink
Error thrown if GalleryRenderer isn't passed an Ansel_View_Gallery ob…
Browse files Browse the repository at this point in the history
…ject
  • Loading branch information
Chuck Hagenbuch committed Sep 6, 2015
1 parent 9fa959b commit 7c7a8e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ansel/lib/View/GalleryProperties.php
Expand Up @@ -455,10 +455,11 @@ protected function _galleryViewStyles()
$dir = ANSEL_BASE . '/lib/View/GalleryRenderer';
$files = scandir($dir);
$views = array();
$galleryView = new Ansel_View_Gallery();
foreach ($files as $file) {
if ($file != 'Base.php' && strpos($file, '.') !== 0) {
$class = 'Ansel_View_GalleryRenderer_' . substr($file, 0, -4);
$view = new $class(null);
$view = new $class($galleryView);
$views[substr($file, 0, -4)] = $view->title;
}
}
Expand Down

0 comments on commit 7c7a8e1

Please sign in to comment.