Class name must be a valid object or a string
I am seeing a strange issue that "seemed" to create itself. When trying to access a member record I get this error:
Class name must be a valid object or a string
in httpdocs/administrator/components/com_civicrm/civicrm/CRM/Utils/SQL.php (line 61)
- @param string
joinColumn * @return array */ public static function mergeSubquery(
entityName, $joinColumn = 'id') { -
baoName = CRM_Core_DAO_AllCoreTables::getBAOClassName(CRM_Core_DAO_AllCoreTables::getFullName(
entityName)); - $bao = new $baoName();
- $fields = $bao::getSupportedFields();
- $mergeClauses = $subClauses = [];
- foreach ((array) $bao->addSelectWhereClause($entityName) as $fieldName =>
fieldClauses) { if (
fieldClauses) { foreach ((array) $fieldClauses as $fieldClause) {
The command that is failing is $bao = new $baoName
This error seemed to manifest itself (I know it won't have!). I restored a dump of the database from a previous day and can access the member record just fine , when I restore the database it then throws this error.
What more can I do to try and trace the source of it. My gut feel is that it's a DB corruption of sorts but I am unable to identify what. I set SQL trace on in CiviCRM but that doesn't display any errors that I can see.
Suggestions please?
My site is running Joomla 4.4 , PHP 8.0.30 and CiviCRM 5.67.1