Skip to content
Permalink
Browse files

Fix deprecated nested ternary statement

Merge remote-tracking branch 'origin/pr/14657' into 3.x

* origin/pr/14657:
  Fix a potential PHP 7.4/8.0 compatibility issue
  • Loading branch information...
opengeek committed Aug 14, 2019
2 parents bb825dc + 4244d4d commit 2bf65ad4d6bd30981dda4329d8c34195eb75e000
Showing with 7 additions and 3 deletions.
  1. +7 −3 manager/controllers/default/resource/update.class.php
@@ -143,9 +143,13 @@ public function process(array $scriptProperties = [])
foreach ($fields as $field) {
$this->resourceArray[$field] = !empty($this->resourceArray[$field]);
}
$this->resourceArray['syncsite'] = isset($this->resourceArray['syncsite'])
? !empty($this->resourceArray['syncsite'])
: !empty($this->context->getOption('syncsite_default', 1, $this->modx->_userConfig));
if (isset($this->resourceArray['syncsite'])) {
$this->resourceArray['syncsite'] = !empty($this->resourceArray['syncsite']);
} else {
$syncsiteDefault = $this->context->getOption('syncsite_default', 1,
$this->modx->_userConfig);
$this->resourceArray['syncsite'] = !empty($syncsiteDefault);
}
if (!empty($this->resourceArray['parent'])) {
if ($this->parent->get('id') == $this->resourceArray['parent']) {
$this->resourceArray['parent_pagetitle'] = $this->modx->stripTags($this->parent->get('pagetitle'));

0 comments on commit 2bf65ad

Please sign in to comment.
You can’t perform that action at this time.