silverstripe-cms/code
maks 599e198e89
simplify code using !empty
Hello @robbieaverill, please check my assumption...it's been a long time since I have last used SS (v3.2 was my last, if i remember correctly)
in the following lines 438:
```php
        if (isset($this->templates[$action]) && $this->templates[$action]
            || (isset($this->templates['index']) && $this->templates['index'])
            || $this->template
        ) {
            return parent::getViewer($action);
        }
```
it looks like the 1st two (same-line) condition should be wrapped inside `()` while checking for a non-index action template .... if not just kill this PR at once. :-)
if the answer is yes then we can just use `!empty(...)` which is the same as 'isset(...) + truthy check'

kind regards, 
maks
2018-08-17 14:51:36 +02:00
..
BatchActions Update CMS for versioned enhancements (#2122) 2018-03-14 16:34:46 +13:00
Controllers simplify code using !empty 2018-08-17 14:51:36 +02:00
Forms NEW add SiteTree::updateAnchorsOnPage() for user defining additional page anchors 2018-07-15 14:19:14 +12:00
Model Merge branch '4.2' into 4 2018-07-23 15:58:14 +01:00
Reports Docblock 2017-11-02 11:29:49 +13:00
Search Merge branch '3.6' into 4.0 2018-03-18 09:17:20 +00:00
Tasks API Implement polymorphic sitetree link tracking (#2123) 2018-04-06 15:53:57 +12:00