fix tests that will fail after 2021
authordemeritcowboy <demeritcowboy@hotmail.com>
Sat, 1 Jan 2022 19:06:35 +0000 (14:06 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Sat, 1 Jan 2022 19:06:35 +0000 (14:06 -0500)
CRM/Core/Payment/Dummy.php

index ba458d18953b5c8578feea5da025b21bc1b6ef27..9d36f55aff63ae82b8e85695bed46f79354f8019 100644 (file)
@@ -90,7 +90,7 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment {
     CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $propertyBag);
     // This means we can test failing transactions by setting a past year in expiry. A full expiry check would
     // be more complete.
-    if (!empty($params['credit_card_exp_date']['Y']) && date('Y') >
+    if (!empty($params['credit_card_exp_date']['Y']) && CRM_Utils_Time::date('Y') >
       CRM_Core_Payment_Form::getCreditCardExpirationYear($params)) {
       throw new PaymentProcessorException(ts('Invalid expiry date'));
     }