From ed36ff8532b9683d49bc8847307dacab328ebb29 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Fri, 14 Dec 2018 09:54:02 +1000 Subject: [PATCH] Fix test for JSON fields in output for credentials, discoveries and tasks. --- code_igniter/application/helpers/output_helper.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code_igniter/application/helpers/output_helper.php b/code_igniter/application/helpers/output_helper.php index 7b18c29d5..76974260c 100644 --- a/code_igniter/application/helpers/output_helper.php +++ b/code_igniter/application/helpers/output_helper.php @@ -47,8 +47,6 @@ * * @author Mark Unwin * - * @param Object log_details An object containing details you wish to log - * * @return NULL [logs the provided string to the log file] */ function output() @@ -122,7 +120,7 @@ function output() $array = array(); if (!empty($CI->response->data)) { foreach ($CI->response->data as $item) { - if (!empty($item->attributes)) { + if (!empty($item->attributes) and !empty($item->attributes->{$column})) { foreach ($item->attributes->{$column} as $key => $value) { $array[] = $column.'.'.$key; }