mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fix errors submitting a credit card field
This commit is contained in:
parent
960e3428b6
commit
199dd648da
@ -7,7 +7,9 @@
|
||||
class CreditCardField extends TextField {
|
||||
|
||||
function Field() {
|
||||
$parts = explode("\n", chunk_split($this->value,4,"\n"));
|
||||
$parts = $this->value;
|
||||
if(!is_array($parts))
|
||||
$parts = explode("\n", chunk_split($parts,4,"\n"));
|
||||
$parts = array_pad($parts, 4, "");
|
||||
|
||||
// TODO Mark as disabled/readonly
|
||||
|
Loading…
Reference in New Issue
Block a user