MDL-52292 testing: block generator fix
authorDan Poltawski <dan@moodle.com>
Tue, 1 Dec 2015 19:02:28 +0000 (19:02 +0000)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 3 Dec 2015 10:13:28 +0000 (11:13 +0100)
Stop errors when no $options supplied

lib/testing/generator/data_generator.php

index 8b7678b..7af3e2e 100644 (file)
@@ -473,7 +473,7 @@ EOD;
      * @param array $options further, block-specific options to control how the block is created.
      * @return stdClass new block_instance record.
      */
-    public function create_block($blockname, $record=null, array $options=null) {
+    public function create_block($blockname, $record=null, array $options=array()) {
         $generator = $this->get_plugin_generator('block_'.$blockname);
         return $generator->create_instance($record, $options);
     }