From ba55f98d6e776788c6ac64f2fdbfaaef40010450 Mon Sep 17 00:00:00 2001 From: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 20 Nov 2020 14:21:06 +1300 Subject: [PATCH] fix: Process array responses. Some actions return un unprocessed array. Process these so that the environment indicator can be added. Fixes #11 --- src/Extensions/EnvBarExtension.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Extensions/EnvBarExtension.php b/src/Extensions/EnvBarExtension.php index 8ecd456..c565778 100644 --- a/src/Extensions/EnvBarExtension.php +++ b/src/Extensions/EnvBarExtension.php @@ -60,6 +60,9 @@ public function beforeCallActionHandler($request, $action) */ public function afterCallActionHandler($request, $action, $result) { + if (is_array($result)) { + $result = $this->owner->getViewer($action)->process($this->owner->customise($result)); + } if (!($result instanceof DBHTMLText)) { return $result; }