Skip to content

Commit

Permalink
Fixed issue #15973: Invalid submitfailed received
Browse files Browse the repository at this point in the history
Dev: PDOStatement::rowCount are unstable and unsure.
Dev: then don't use it if submitdate are not updated
  • Loading branch information
Shnoulle committed Mar 16, 2020
1 parent 24bb6f6 commit 24b0b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -5681,7 +5681,7 @@ private function _UpdateValuesInDatabase($finished=false)
} else {
$submitdate = date("Y-m-d H:i:s",mktime(0,0,0,1,1,1980));
}
if (!Response::model($this->sid)->updateByPk($oResponse->id,array('submitdate'=>$submitdate))) {
if ($submitdate != $oResponse->submitdate && !Response::model($this->sid)->updateByPk($oResponse->id,array('submitdate'=>$submitdate))) {
LimeExpressionManager::addFrontendFlashMessage('error', $this->gT('An error happened when trying to submit your response.'), $this->sid);
}
}
Expand Down

0 comments on commit 24b0b4e

Please sign in to comment.