From 13b6089375fcec5614fe45f670543f37ef00965e Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Wed, 14 Sep 2016 20:52:43 +0200 Subject: [PATCH] Fix TransferPayout : method did not set overridePaymentMethod, when it was type "Cash", because array search returned 0, wich was false... --- common/components/TransferPayout.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/components/TransferPayout.php b/common/components/TransferPayout.php index d4bad9e..ad85b99 100644 --- a/common/components/TransferPayout.php +++ b/common/components/TransferPayout.php @@ -96,7 +96,9 @@ class TransferPayout extends \yii\base\Object{ } \Yii::info("fizetési mód: " . $this->overridePaymentMethod); - if ( isset($this->overridePaymentMethod ) && array_search($this->overridePaymentMethod, array_keys( Transfer::paymentMethods()) ) ){ + + $arr = Transfer::paymentMethods(); + if ( isset($this->overridePaymentMethod ) && array_key_exists($this->overridePaymentMethod, $arr) ){ \Yii::info("fizetési mód beállítva: " .$this->overridePaymentMethod ); $transfer->payment_method = $this->overridePaymentMethod; }