Merge pull request #17257 from ibuiv/patch-4

Fix Infinite Loop in trigger
This commit is contained in:
Laurent Destailleur 2021-04-13 23:01:28 +02:00 committed by GitHub
commit 7e4dcde089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1556,9 +1556,10 @@ class CommandeFournisseur extends CommonOrder
*
* @param User $user User making the clone
* @param int $socid Id of thirdparty
* @param int $notrigger Disable all triggers
* @return int New id of clone
*/
public function createFromClone(User $user, $socid = 0)
public function createFromClone(User $user, $socid = 0, $notrigger = 0)
{
global $conf, $user, $hookmanager;
@ -1605,7 +1606,7 @@ class CommandeFournisseur extends CommonOrder
// Create clone
$this->context['createfromclone'] = 'createfromclone';
$result = $this->create($user);
$result = $this->create($user, $notrigger);
if ($result < 0) {
$error++;
}