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

Undefined index in Core/BAO/SchemaHandler.php

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.20
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      When CiviCRM is opened, at least under Joomla, you get a string of errors in the PHP log along the lines of:

      Undefined index: civicrm_location_type in <joomla root>/administrator/components/com_civicrm/civicrm/CRM/Core\BAO/SchemaHandler.php on line 730.  The line in question reads as follows:

       

            foreach ($requiredIndices[$sigParts[0]] as $index) { 

      and the error is because $sigParts[0] is not found in $requiredIndices.

       

      In addition, there are a couple of examples of something like this:

          foreach ($existingIndices as $table => $indices) {
            CRM_Core_BAO_SchemaHandler::addIndexSignature($table, $indices);
            $extSigs[] = CRM_Utils_Array::collect('sig', $indices);
      {{    }}}
          CRM_Utils_Array::flatten($extSigs, $existingSigs);

      where the scope of $extSigs is within the foreach loop I believe, which means that the flatten function  doesn't have $extSigs to work on.

      I thought I should flag this up before attempting to fix it.  There may be ramifications of which I am not aware.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              spalmstr Stephen Palmstrom
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: