Permalink
Browse files

BUGFIX: Fix errors submitting a credit card field

  • Loading branch information...
1 parent 960e342 commit 199dd648da538cd307e8153c651bee5bbdb7d5a6 @andrewandante andrewandante committed with chillu Mar 12, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 forms/CreditCardField.php
@@ -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

1 comment on commit 199dd64

Owner

halkyon commented on 199dd64 Mar 12, 2012

I've fixed the coding style here, but you should put if on one line, or in braces as per our coding conventions.

Please sign in to comment.