From 454f5538b19ad9862aafb9f3cf92c84efa4d146a Mon Sep 17 00:00:00 2001 From: Marc-Alexandre Ghaly Date: Thu, 11 May 2023 11:29:58 -0400 Subject: [PATCH] Feat: Dataflow iterator needs an iterating value from json_reader --- classes/local/step/reader_json.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/local/step/reader_json.php b/classes/local/step/reader_json.php index 4d38451d..6e301bc6 100644 --- a/classes/local/step/reader_json.php +++ b/classes/local/step/reader_json.php @@ -84,6 +84,10 @@ protected function parse_json() { ['data' => $decodedjson] ); + if (!is_array($returnarray)) { + $returnarray = (object) $returnarray; + } + if (is_null($returnarray)) { throw new \moodle_exception(get_string('reader_json:failed_to_fetch_array', 'tool_dataflows', $config->arrayexpression));