Skip to content

Commit d9251c9

Browse files
authored
Make sure $transaction is an object
1 parent c85180f commit d9251c9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Model/Api/Transaction.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ public function updateMetadata($quote, $metadata, $merge = true)
219219

220220
$transaction = json_decode($quote->getMondidoTransaction());
221221

222+
if (!is_object($transaction)) {
223+
return false;
224+
}
225+
222226
if (property_exists($transaction, 'id')) {
223227
$id = $transaction->id;
224228
} else {

0 commit comments

Comments
 (0)