Yes it's ok for me. Le 04/09/2013 12:44, Laurent Destailleur (eldy) a écrit :
Le 04/09/2013 07:32, Sébastien a écrit :function __clone() { // Force a copy of this->lines, otherwise it will point to same object. for($i=0; $i < count($this->lines); $i++){ $this->lines[$i] = clone $this->lines[$i]; } }So we should have this __clone function for all objects that has ->lines array. I tried to add into the commonobject.class.phpfunction __clone() { // Force a copy of this->lines, otherwise it will point to same object. if (isset($this->lines) && is_array($this->lines)) { for($i=0; $i < count($this->lines); $i++) { $this->lines[$i] = dol_clone($this->lines[$i]); } } } Is it ok for you ?
_______________________________________________ Dolibarr-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
