Skip to content

Commit

Permalink
Feat: Dataflow iterator needs an iterating value from json_reader
Browse files Browse the repository at this point in the history
  • Loading branch information
marcghaly committed May 15, 2023
1 parent 369253a commit 454f553
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/local/step/reader_json.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 454f553

Please sign in to comment.