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

potential SQL errors in CRM_Event_BAO_Event::getEvents()

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.2, 3.2.1, 3.2.2, 3.2.3
    • Fix Version/s: 3.2.4
    • Component/s: CiviEvent
    • Labels:
      None

      Description

      This method allows two separate WHERE clauses to be added to an SQL query, generating a fatal error. This happens when the method parameters are (false, N), as in this example:
      $foo = CRM_Event_BAO_Event::getEvents(FALSE, 1);

      The attached patch assumes that if $id is provided, $all is irrelevant, thus avoiding the error case. Patch also adds docblock comment for $id parameter.

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: