Fix deprecation handling
authoreileen <emcnaughton@wikimedia.org>
Tue, 30 Apr 2019 21:33:26 +0000 (09:33 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 30 Apr 2019 21:33:26 +0000 (09:33 +1200)
Turns out we were one of the sites naughtily using the BAO directly who needed this handling
to work - but because we passed a number in quote it didn't - this fixes

CRM/Contribute/BAO/ContributionRecur.php

index 51ff736c2fc3fa51a91629453a6af9323732c64f..c72b03236836a6d85e3324bde008f1883985b4ff 100644 (file)
@@ -263,7 +263,7 @@ class CRM_Contribute_BAO_ContributionRecur extends CRM_Contribute_DAO_Contributi
    * @return bool
    */
   public static function cancelRecurContribution($params) {
-    if (is_int($params)) {
+    if (is_numeric($params)) {
       CRM_Core_Error::deprecatedFunctionWarning('You are using a BAO function whose signature has changed. Please use the ContributionRecur.cancel api');
       $params = ['id' => $params];
     }