From ec8c4582e1977330c6c7bd891d537361c10778a7 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Mon, 13 May 2013 11:36:57 -0700 Subject: [PATCH] CRM-12597 ---------------------------------------- * CRM-12597: CLONE - Undefined variable: val in CRM_Contribute_BAO_Query::whereClauseSingle() http://issues.civicrm.org/jira/browse/CRM-12597 --- CRM/Contribute/BAO/Query.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index e965c59b2f..de3befd433 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -547,6 +547,15 @@ class CRM_Contribute_BAO_Query { default: //all other elements are handle in this case $fldName = substr($name, 13); + if (!isset($fields[$fldName])) { + // CRM-12597 + CRM_Core_Session::setStatus(ts( + 'We did not recognize the search field: %1. Please check and fix your smart groups.', + array(1 => $fldName) + ) + ); + return; + } $whereTable = $fields[$fldName]; $value = trim($value); -- 2.25.1