On further debugging, I see that this function isn't returning anything
CRM_Core_DAO_AllCoreTables::getClassForTable($this->rule_table). (Line 61 Dedupe/BAO/Rule.php)
So, in getClassForTable, the list of tables doesn't include 'civicrm_view_members_1' and therefore
$entity = CRM_Core_DAO_AllCoreTables::getBriefName(CRM_Core_DAO_AllCoreTables::...
We are experiencing a similar type error on staging site running 5.21
-we have created a custom field in the civicrm profile used for site registration, e.g. that matches on a unique identifier (card Number)
-The error we are getting looks likes this :
TypeError: Argument 1 passed to civicrm_api3() must be of the type string, null given, called in /home/...
The quicksearch function is for searching contacts, and therefore doesn't call to any of the other components of Civi for data fields.
As per Civi's Docs, if you're looking for data regarding a specific component (i.e Memberships), each component has it's own search function. In Find Memberships, this should also show your custom fields to allow you to ...