Permalink
Browse files
BUGFIX: Fix errors submitting a credit card field
- Loading branch information...
Showing
with
3 additions
and
1 deletion.
-
+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
|
|
|
This comment has been minimized.
Show comment Hide commenthalkyonMar 12, 2012
OwnerI've fixed the coding style here, but you should put if on one line, or in braces as per our coding conventions.
halkyon commented onMar 12, 2012
199dd64
I've fixed the coding style here, but you should put if on one line, or in braces as per our coding conventions.