Skip to content

Commit

Permalink
FIX clone when cloning object with ->lines containing not object
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 25, 2023
1 parent ecbcfa2 commit 96d2888
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5343,7 +5343,9 @@ public function __clone()
if (isset($this->lines) && is_array($this->lines)) {
$nboflines = count($this->lines);
for ($i = 0; $i < $nboflines; $i++) {
$this->lines[$i] = clone $this->lines[$i];
if (is_object($this->lines[$i])) {
$this->lines[$i] = clone $this->lines[$i];
}
}
}
}
Expand Down

0 comments on commit 96d2888

Please sign in to comment.