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:
c1f3628
)
[php8-compat] Fix issue in APIv3 Where by because product has a column called options...
author
Seamus Lee
<seamuslee001@gmail.com>
Fri, 4 Jun 2021 22:38:55 +0000
(22:38 +0000)
committer
Seamus Lee
<seamuslee001@gmail.com>
Fri, 4 Jun 2021 22:38:55 +0000
(22:38 +0000)
api/v3/Generic.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Generic.php
b/api/v3/Generic.php
index 586d34f5b98ecff1909ac5fdf9cf4a7867ebcac6..9a55547607365e1828914cfcd6a0fe62c38c9528 100644
(file)
--- a/
api/v3/Generic.php
+++ b/
api/v3/Generic.php
@@
-511,7
+511,12
@@
function _civicrm_api3_generic_get_metadata_options(&$metadata, $apiRequest, $fi
return;
}
- $fieldsToResolve = $apiRequest['params']['options']['get_options'];
+ if (!is_array($apiRequest['params']['options'])) {
+ $fieldsToResolve = [];
+ }
+ else {
+ $fieldsToResolve = $apiRequest['params']['options']['get_options'];
+ }
if (!empty($metadata[$fieldname]['options']) || (!in_array($fieldname, $fieldsToResolve) && !in_array('all', $fieldsToResolve))) {
return;