Skip to content

Commit

Permalink
forcing array return
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Mar 11, 2022
1 parent 168fdb9 commit 3c3eb04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions paynlpaymentmethods/src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ public static function addTransactionHash($transaction_id, $hash)
/**
* Returns the transaction based on transaction_id from the pay_transactions table
*
* @param int $transaction_id
* @return array
*
* @param $transaction_id
* @return array
*/
public static function get($transaction_id)
{
$transaction = Db::getInstance()->getRow("SELECT * FROM `" . _DB_PREFIX_ . "pay_transactions` WHERE `transaction_id` = '" . Db::getInstance()->escape($transaction_id) . "';");
return $transaction;
$result = Db::getInstance()->getRow("SELECT * FROM `" . _DB_PREFIX_ . "pay_transactions` WHERE `transaction_id` = '" . Db::getInstance()->escape($transaction_id) . "';");

return is_array($result) ? $result : array();
}
}

0 comments on commit 3c3eb04

Please sign in to comment.