File tree Expand file tree Collapse file tree 3 files changed +752
-2
lines changed
tests/php-unit-tests/unitary-tests/core Expand file tree Collapse file tree 3 files changed +752
-2
lines changed Original file line number Diff line number Diff line change @@ -3345,10 +3345,12 @@ public function DBUpdate()
3345
3345
$ this ->m_bDirty = false ;
3346
3346
$ this ->m_aTouchedAtt = array ();
3347
3347
$ this ->m_aModifiedAtt = array ();
3348
-
3348
+ $ bModifiedByUpdateDone = false ;
3349
3349
try {
3350
3350
$ this ->EventUpdateDone ($ aChanges );
3351
3351
$ this ->AfterUpdate ();
3352
+ // Save the status as it is reset just after...
3353
+ $ bModifiedByUpdateDone = $ this ->IsModified ();
3352
3354
3353
3355
// Reset original values although the object has not been reloaded
3354
3356
foreach ($ this ->m_aLoadedAtt as $ sAttCode => $ bLoaded ) {
@@ -3388,7 +3390,7 @@ public function DBUpdate()
3388
3390
MetaModel::StopReentranceProtection (Metamodel::REENTRANCE_TYPE_UPDATE , $ this );
3389
3391
}
3390
3392
3391
- if ($ this ->IsModified ()) {
3393
+ if ($ this ->IsModified () || $ bModifiedByUpdateDone ) {
3392
3394
// Controlled reentrance
3393
3395
$ this ->DBUpdate ();
3394
3396
}
You can’t perform that action at this time.
0 commit comments