mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #2239 from pine3ree/patch-3
simplify code using !empty
This commit is contained in:
commit
eae155a228
@ -435,8 +435,8 @@ HTML;
|
||||
public function getViewer($action)
|
||||
{
|
||||
// Manually set templates should be dealt with by Controller::getViewer()
|
||||
if (isset($this->templates[$action]) && $this->templates[$action]
|
||||
|| (isset($this->templates['index']) && $this->templates['index'])
|
||||
if (!empty($this->templates[$action])
|
||||
|| !empty($this->templates['index'])
|
||||
|| $this->template
|
||||
) {
|
||||
return parent::getViewer($action);
|
||||
|
Loading…
Reference in New Issue
Block a user