Skip to content
Snippets Groups Projects
Commit 37a77d9c authored by totten's avatar totten
Browse files

CRM_Core_BAO_Block - Fix API regressions

parent 00f0c774
Branches
Tags
No related merge requests found
......@@ -434,8 +434,10 @@ class CRM_Core_BAO_Block {
* @static
*/
public static function handlePrimary(&$params, $class) {
$coreTables = CRM_Core_DAO_AllCoreTables::getCoreTables();
$table = array_search($class, $coreTables);
$table = CRM_Core_DAO_AllCoreTables::getTableForClass($class);
if (!$table) {
throw new API_Exception("Failed to locate table for class [$class]");
}
// contact_id in params might be empty or the string 'null' so cast to integer
$contactId = (int) CRM_Utils_Array::value('contact_id', $params);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment