Skip to content

Commit 8a32682

Browse files
committed
updated charge_card adding check to make sure the passed cc index exists to fix php notice
1 parent a0eb538 commit 8a32682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cc.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function charge_card($custid, $amount = false, $invoice = false, $module = 'defa
400400
$response['code'] = 0;
401401
//$cc = $data['cc'];
402402
$ccs = parse_ccs($data);
403-
$cc = (isset($GLOBALS['tf']->variables->request['ot_cc'])) ? $GLOBALS['tf']->decrypt($ccs[$GLOBALS['tf']->variables->request['ot_cc']]['cc']) : $GLOBALS['tf']->decrypt($data['cc']);
403+
$cc = isset($GLOBALS['tf']->variables->request['ot_cc']) && isset($ccs[$GLOBALS['tf']->variables->request['ot_cc']]) ? $GLOBALS['tf']->decrypt($ccs[$GLOBALS['tf']->variables->request['ot_cc']]['cc']) : $GLOBALS['tf']->decrypt($data['cc']);
404404
$cc = trim($cc);
405405
$cc = str_replace([' ', '_', '-'], ['', '', ''], $cc);
406406
$badcc = get_bad_cc();

0 commit comments

Comments
 (0)