Compare commits

...

2 Commits

Author SHA1 Message Date
Tony Air 141043d219 FIX: PHP8.1 2024-03-24 22:46:35 +02:00
Tony Air a6d9d432a6 FIX: AJAX 2024-03-24 22:33:48 +02:00
1 changed files with 5 additions and 3 deletions

View File

@ -207,9 +207,11 @@ class AjaxControllerEx extends Extension
$url = $req->getURL();
$url = $url === 'home' ? '/' : $url;
$ajax_res = $ctrl->config()->get('ajax_resources');
$graphql_res = $ctrl->config()->get('graphql_resources');
$resources = array_merge(
$ctrl->config()->get('graphql_resources'),
$ctrl->config()->get('ajax_resources')
$ajax_res ? $ajax_res : [],
$graphql_res ? $graphql_res : []
);
$body = $response->getBody();
@ -259,7 +261,7 @@ class AjaxControllerEx extends Extension
}
// render page
if (!self::isJson($body)) {
if ($body && !self::isJson($body)) {
$body = json_encode([
'ID' => $record->ID,
'Title' => $record->Title,