From d195b60c58ffa0cd8881da99d67470acc026d5c5 Mon Sep 17 00:00:00 2001 From: kurund Date: Sat, 3 Aug 2013 03:25:21 +0530 Subject: [PATCH] another fix --- CRM/Core/BAO/Block.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Core/BAO/Block.php b/CRM/Core/BAO/Block.php index 2866138b74..bf88799764 100644 --- a/CRM/Core/BAO/Block.php +++ b/CRM/Core/BAO/Block.php @@ -434,7 +434,9 @@ class CRM_Core_BAO_Block { * @static */ public static function handlePrimary(&$params, $class) { - $table = CRM_Core_DAO_AllCoreTables::getTableForClass($class); + $coreTables = CRM_Core_DAO_AllCoreTables::getCoreTables(); + $table = array_search($class, $coreTables); + // contact_id in params might be empty or the string 'null' so cast to integer $contactId = (int) CRM_Utils_Array::value('contact_id', $params); // If id is set & we haven't been passed a contact_id, retrieve it -- 2.25.1