mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Do not use integer keys in forms - ChangePaymentMethodType
This commit is contained in:
parent
ac2d41aa68
commit
c03b3f6180
1 changed files with 2 additions and 2 deletions
|
|
@ -29,8 +29,8 @@ final class ChangePaymentMethodType extends AbstractType
|
|||
$form = $event->getForm();
|
||||
|
||||
foreach ($payments as $key => $payment) {
|
||||
if (!in_array($payment->getState(), [PaymentInterface::STATE_NEW, PaymentInterface::STATE_CART])) {
|
||||
$form->remove($key);
|
||||
if (!in_array($payment->getState(), [PaymentInterface::STATE_NEW, PaymentInterface::STATE_CART], true)) {
|
||||
$form->remove((string) $key);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue