Skip to content

Commit

Permalink
Return the original style if no stack style.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Apr 21, 2014
1 parent e012fe8 commit 6b48a3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ansel/lib/Style.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public function __get($property)
{
if ($property == 'keyimage_type') {
// Force the same type of effect for key image/stacks if available
$class = $this->_properties['thumbstyle'] . 'Stack';
if (!class_exists('Ansel_ImageGenerator_' . $class)) {
$class = (!empty($this->_properties['thumbstyle']) ? $this->_properties['thumbstyle'] : '') . 'Stack';
if (!empty($this->_properties['thumbstyle']) && !class_exists('Ansel_ImageGenerator_' . $class)) {
$class = $this->_properties['thumbstyle'];
} elseif (!class_exists('Ansel_ImageGenerator_' . $class)) {
$class = 'Thumb';
}

Expand Down

0 comments on commit 6b48a3a

Please sign in to comment.