Skip to content

Commit

Permalink
Null coalescing for e_theme constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Jan 18, 2020
1 parent f5f1454 commit cf8dc0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e107_handlers/theme_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class e_theme

function __construct($options=array())
{
$options['force'] = isset($options['force']) ? $options['force'] : false;

if(!empty($options['themedir']))
{
$this->_current = $options['themedir'];
Expand Down
1 change: 1 addition & 0 deletions e107_tests/tests/unit/e_themeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public function testGetThemeLayout()

foreach($tests as $item=>$var)
{
$var['script'] = isset($var['script']) ? $var['script'] : null;

$result = $this->tm->getThemeLayout($pref, $defaultLayout, $var['url'], $var['script']);
$this->assertEquals($var['expected'],$result, "Wrong theme layout returned for item [".$item."] ".$var['url']);
Expand Down

0 comments on commit cf8dc0b

Please sign in to comment.