Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.17
-
Component/s: Core CiviCRM
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Drupal 7.43
CiviCRM 4.6.17
PHP 5.5.36
For me several user accounts in Drupal are linked to contact records in Civi, and in the standard way where you see the linked contact details on the (eg) "user/1" page.
On login, or viewing another user in Drupal the following 3 notice errors are fired now after yesterday's upgrade from 4.6.16 to 4.6.17:
Notice: Undefined variable: order in CRM_Contact_BAO_Query->prepareOrderBy() (line 5846 of /home/.../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
Notice: Undefined variable: order in CRM_Contact_BAO_Query->prepareOrderBy() (line 5886 of /home/.../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
Notice: Undefined variable: order in CRM_Contact_BAO_Query->prepareOrderBy() (line 5890 of /home/.../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
We fix this by adding "$order = NULL;" at the top of function prepareOrderBy() in /sites/all/modules/civicrm/CRM/Contact/BAO/Query.php
protected function prepareOrderBy($sort, $sortByChar, $sortOrder, $additionalFromClause) {
$order = NULL;
$config = CRM_Core_Config::singleton();
.......
Happy to PR but I'm on 4.6.17 not 4.7.x