Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21479

4.7.28-rc: updateContributionInvoiceNumber() syntax error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Blocker
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.28
    • Fix Version/s: 4.7.28
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      When running the upgrade, updateContributionInvoiceNumber() has a syntax error that only affects sites using invoicing:

       

       
      public static function updateContributionInvoiceNumber(CRM_Queue_TaskContext $ctx, $startID, $endID, $invoicePrefix) {
      
          CRM_Core_DAO::executeQuery("
            UPDATE `civicrm_contribution` SET `invoice_number` = CONCAT(%1, `id`)
             WHERE `id` BETWEEN (%2 AND %3) AND `invoice_number` IS NOT NULL ",
            array(
              1 => array($invoicePrefix, 'string'), // <-----
              2 => array($startID, 'Integer'),
              3 => array($endID, 'Integer'),
            )
          );
      
          return TRUE;
        }
      

       

      Error: Exception: "A fatal error was triggered: Cannot recognize string for INV_"                                                                                                                              

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: