projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1198660
)
APIv4 - Silently ignore errors in CoreUtil::getInfoItem()
author
Coleman Watts
<coleman@civicrm.org>
Tue, 10 Aug 2021 22:03:15 +0000
(18:03 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Tue, 10 Aug 2021 22:03:15 +0000
(18:03 -0400)
Fixes dev/core#2751
Civi/Api4/Utils/CoreUtil.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Api4/Utils/CoreUtil.php
b/Civi/Api4/Utils/CoreUtil.php
index 7d27b9ea247f5e6a34317dea9e9ccfb50bf5278a..0c9f9612a6558d263f69b9b4f1ccb76e5f78b075 100644
(file)
--- a/
Civi/Api4/Utils/CoreUtil.php
+++ b/
Civi/Api4/Utils/CoreUtil.php
@@
-60,7
+60,8
@@
class CoreUtil {
* @return mixed
*/
public static function getInfoItem(string $entityName, string $keyToReturn) {
- return self::getApiClass($entityName)::getInfo()[$keyToReturn] ?? NULL;
+ $className = self::getApiClass($entityName);
+ return $className ? $className::getInfo()[$keyToReturn] ?? NULL : NULL;
}
/**