Skip to content

Commit f06415d

Browse files
committed
[BUGFIX] Use array_merge, '+=' is for array union
1 parent 50bba47 commit f06415d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

PHPCtags.class.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,17 @@ public function export($file)
317317
}
318318

319319
$this->setMFile((string) $filename);
320-
$this->mStructs += $this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE);
320+
$this->mStructs = array_merge(
321+
$this->mStructs,
322+
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
323+
);
321324
}
322325
} else {
323326
$this->setMFile($file);
324-
$this->mStructs += $this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE);
327+
$this->mStructs = array_merge(
328+
$this->mStructs,
329+
$this->struct($this->mParser->parse(file_get_contents($this->mFile)), TRUE)
330+
);
325331
}
326332
return $this->render();
327333
}

0 commit comments

Comments
 (0)