CRM-18743 - Undefined variable $order
authorrollox <rollox@users.noreply.github.com>
Mon, 6 Jun 2016 00:18:09 +0000 (01:18 +0100)
committerrollox <rollox@users.noreply.github.com>
Mon, 6 Jun 2016 00:18:09 +0000 (01:18 +0100)
Fixes 3 notice/errors stating "Undefined variable: order in CRM_Contact_BAO_Query->prepareOrderBy()" on Drupal user page when the user record is linked to a Civi contact record. eg at path: user/1

CRM/Contact/BAO/Query.php

index 8d0bc48bdb5c7ee982080a9f1836a549fbf4a6df..537744ad75433444cd536eee0ff6c1563fa717c7 100644 (file)
@@ -5952,6 +5952,7 @@ AND   displayRelType.is_active = 1
    *   list(string $orderByClause, string $additionalFromClause).
    */
   protected function prepareOrderBy($sort, $sortByChar, $sortOrder, $additionalFromClause) {
+    $order = NULL;
     $config = CRM_Core_Config::singleton();
     if ($config->includeOrderByClause ||
       isset($this->_distinctComponentClause)