From 7f5cc737f95e6b3fe4c3a67ed8b60067bae513a0 Mon Sep 17 00:00:00 2001 From: danbrellis Date: Wed, 10 Aug 2016 15:01:02 -0400 Subject: [PATCH] Update Export.php Moves the call to strpos() under an "if" statement to make sure the needle in strpos() is not an empty string. --- CRM/Export/BAO/Export.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 6077d1a83d..a69674b353 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -706,14 +706,14 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c $queryString .= $groupBy; - // always add contact_a.id to the ORDER clause - // so the order is deterministic - //CRM-15301 - if (strpos('contact_a.id', $order) === FALSE) { - $order .= ", contact_a.id"; - } - if ($order) { + // always add contact_a.id to the ORDER clause + // so the order is deterministic + //CRM-15301 + if (strpos('contact_a.id', $order) === FALSE) { + $order .= ", contact_a.id"; + } + list($field, $dir) = explode(' ', $order, 2); $field = trim($field); if (!empty($returnProperties[$field])) { -- 2.25.1