Permalink
Browse files

BUGFIX: Fix errors submitting a credit card field

  • Loading branch information...
andrewandante authored and chillu committed Mar 12, 2012
1 parent 960e342 commit 199dd648da538cd307e8153c651bee5bbdb7d5a6
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

@halkyon

This comment has been minimized.

Show comment Hide comment
@halkyon

halkyon Mar 12, 2012

Owner

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

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.