Skip to content
Snippets Groups Projects
Commit feeec7b7 authored by Tim Otten's avatar Tim Otten
Browse files

Merge pull request #1323 from totten/master-handleprimary

CRM_Core_BAO_Block - Fix API regressions
parents 00f0c774 37a77d9c
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