Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4463

Import Manager: Error handled improperly when WHMCS contact matches no client

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      This error is becoming increasingly common:

      importContacts: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'client_id' cannot be null on line 196

      In plugins/import_manager/components/whmcs/whmcs_migrator.php around line 448 change from:

              foreach ($contacts as $contact) {
                  $vars = [
                      'client_id' => isset($this->mappings['clients'][$contact->userid])
                          ? $this->mappings['clients'][$contact->userid]
                          : null,
      

      To

              foreach ($contacts as $contact) {
                  if (!isset($this->mappings['clients'][$contact->userid])) {
                      continue;
                  }
                  $vars = [
                      'client_id' => $this->mappings['clients'][$contact->userid],
      

      Since client_id cannot be null

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/Sep/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 28 minutes
              28m

                Agile