[TASK] Check if method exists before calling it in api utility
This commit is contained in:
parent
14e1490a22
commit
6388fd7bb0
@ -171,6 +171,12 @@ class ApiUtility
|
|||||||
) {
|
) {
|
||||||
$rowResult[$attributeName] = [];
|
$rowResult[$attributeName] = [];
|
||||||
foreach ($methodResult as $object) {
|
foreach ($methodResult as $object) {
|
||||||
|
if (!method_exists(
|
||||||
|
$methodResult,
|
||||||
|
'getOriginalResource'
|
||||||
|
)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$rowResult[$attributeName]
|
$rowResult[$attributeName]
|
||||||
= $this->filereferenceToApi(
|
= $this->filereferenceToApi(
|
||||||
$methodResult->getOriginalResource()
|
$methodResult->getOriginalResource()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user