Skip to content

Commit 3e92fcb

Browse files
committed
'isset(...)' constructs can be merged
1 parent a6308e3 commit 3e92fcb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

class/ObjectTree.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function &makeArrayTree($key = 0, $tags = null, $depth = 0)
270270
*/
271271
public function &myGetParentForums($key, array $ret = [], $uplevel = 0)
272272
{
273-
if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) {
273+
if (isset($this->tree[$key]['parent'], $this->tree[$this->tree[$key]['parent']]['obj'])) {
274274
$ret[$uplevel] = $this->tree[$this->tree[$key]['parent']]['obj'];
275275
if ($this->tree[$key]['parent'] !== $key) {
276276
//$parents = $this->getParentForums($this->tree[$key]['parent'], $ret, $uplevel+1);
@@ -293,7 +293,7 @@ public function &getParentForums($key, $reverse = true)
293293
{
294294
$ret = [];
295295
$pids = [];
296-
if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) {
296+
if (isset($this->tree[$key]['parent'], $this->tree[$this->tree[$key]['parent']]['obj'])) {
297297
$pids[] = $this->tree[$this->tree[$key]['parent']]['obj']->getVar($this->myId);
298298
$parents = $this->myGetParentForums($this->tree[$key]['parent'], $ret);
299299
foreach (\array_keys($parents) as $newkey) {

0 commit comments

Comments
 (0)