Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.8
-
Fix Version/s: 2.0
-
Component/s: CiviContribute
-
Labels:None
Description
If the credit card field on a contribute page is left blank and the form is submitted, the following error displays:
Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0. in /home/fiasiorg/public_html/joomla15/administrator/components/com_civicrm/civicrm/CRM/Utils/System.php on line 459
The following changes to the function at that line corrects the problem, but I'm unsure at this point if there are other implications to the fix:
static function mungeCreditCard( $number, $keep = 4 ) {
if ( $number !== '' )
return substr_replace( $number, $replace, 0, -$keep );
}