mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
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
SilverStripe CMS
PHP5 Content Management System (CMS), see http://silverstripe.org. Requires the framework
module and a silverstripe-installer
base project.
Installation
See installation instructions.
Bugtracker
Bugs are tracked on github.com. Please read our issue reporting guidelines.
Development and Contribution
If you would like to make changes to the SilverStripe core codebase, we have an extensive guide to contributing code.
Links
Description
Languages
PHP
73.3%
JavaScript
20%
Gherkin
4%
Scheme
2.1%
SCSS
0.6%