MDL-67049 grading: options are array, ensure json_decode() knows it
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 28 Oct 2019 01:50:24 +0000 (02:50 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 22 Nov 2019 00:40:18 +0000 (01:40 +0100)
commit8e98f82f12d0a5d360100342be3a7f2da5ff5764
tree1bf2b49eccee0b8e8114a7f63cee87edb9111fb8
parenta5f618d6a988547c31da73f2e5fff48c48c776fb
MDL-67049 grading: options are array, ensure json_decode() knows it

By default json_decode() returns object for associative arrays. That
was not a problem till now becuause array_key_exists() worked with
objects too. But in php74 that emits a warning.

So we need to ensure that the information arriving to it is
an array, allowing everything to continue working ok.
grade/grading/form/rubric/lib.php