You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catch (Exception $e) {
// 1062 is mysql duplicate constraint error. This is expected and doesn't need to be logged.
if (strpos('1062', $e->getMessage()) === false && strpos('constraint_key', $e->getMessage()) === false) {
\WalleeHelper::instance($this->registry)->log('Updating cron failed: ' . $e->getMessage(), \WalleeHelper::LOG_ERROR);
}
\WalleeHelper::instance($this->registry)->dbTransactionRollback();
die();
is not a correct usage of strpos
constraint_key is always present in $e->getMessage() when exception occurs
that is one way to correct the statement
catch (Exception $e) {
// 1062 is mysql duplicate constraint error. This is expected and doesn't need to be logged.
if (!(strpos($e->getMessage(),'1062')>=0 && strpos($e->getMessage(),'for key \’constraint_key'')>=0)) {
\WalleeHelper::instance($this->registry)->log('Updating cron failed: ' . $e->getMessage(), \WalleeHelper::LOG_ERROR);
}
\WalleeHelper::instance($this->registry)->dbTransactionRollback(); // on ignore
die();
Reginald
The text was updated successfully, but these errors were encountered:
// 1062 is mysql duplicate constraint error. This is expected and doesn't need to be logged.
if (!(strpos($e->getMessage(),'1062')>=0 && strpos($e->getMessage(),'for key \’constraint_key\'')>=0)) {
\WalleeHelper::instance($this->registry)->log('Updating cron failed: ' . $e->getMessage(), \WalleeHelper::LOG_ERROR);
}
\WalleeHelper::instance($this->registry)->dbTransactionRollback(); // on ignore
die();
Thank you for your message and for bringing this to our attention. In order to investigate this issue further, we would need more details about your Wallee account and the specific configuration you’re using.
Could you please send an email to [email protected] with your account details and include my name in the message? I’ll make sure to review the situation personally and get back to you as soon as possible.
Thank you for your cooperation, and we look forward to resolving this issue for you.
that is one way to correct the statement
catch (Exception $e) {
// 1062 is mysql duplicate constraint error. This is expected and doesn't need to be logged.
if (!(strpos($e->getMessage(),'1062')>=0 && strpos($e->getMessage(),'for key \’constraint_key'')>=0)) {
\WalleeHelper::instance($this->registry)->log('Updating cron failed: ' . $e->getMessage(), \WalleeHelper::LOG_ERROR);
}
\WalleeHelper::instance($this->registry)->dbTransactionRollback(); // on ignore
die();
Reginald
The text was updated successfully, but these errors were encountered: