Skip to content

Commit

Permalink
Fix: [ bug #1451 ] Interrupted order clone through trigger, loads non…
Browse files Browse the repository at this point in the history
…existent order
  • Loading branch information
marcosgdf committed Jun 10, 2014
1 parent 7cb5cc5 commit ff37adf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -11,6 +11,7 @@ Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice l
limit date for payment
Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and LINEORDER_INSERT ignore interception on error
Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler
Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order

***** ChangeLog for 3.5.3 compared to 3.5.2 *****
Fix: Error on field accountancy code for export profile of invoices.
Expand Down
4 changes: 4 additions & 0 deletions htdocs/commande/fiche.php
Expand Up @@ -112,6 +112,9 @@
{
if ($object->id > 0)
{
//Because createFromClone modifies the object, we must clone it so that we can restore it later
$orig = clone $object;

$result=$object->createFromClone($socid);
if ($result > 0)
{
Expand All @@ -121,6 +124,7 @@
else
{
setEventMessage($object->error, 'errors');
$object = $orig;
$action='';
}
}
Expand Down

0 comments on commit ff37adf

Please sign in to comment.