]> git.mjollnir.org Git - moodle.git/commitdiff
xmldb: MDL-17262 warnings and fatal error when trying to create a unique key or index.
authortjhunt <tjhunt>
Tue, 18 Nov 2008 07:29:45 +0000 (07:29 +0000)
committertjhunt <tjhunt>
Tue, 18 Nov 2008 07:29:45 +0000 (07:29 +0000)
lib/xmldb/xmldb_index.php
lib/xmldb/xmldb_key.php

index 255aec4e39422456d17069b10a1ac76591388943..b4d6d2b713313c0b1c478737137d28517f360e2f 100644 (file)
@@ -34,7 +34,7 @@ class xmldb_index extends xmldb_object {
     /**
      * Creates one new xmldb_index
      */
-    function __construct($name, $type=null, $fields=null) {
+    function __construct($name, $type=null, $fields=array()) {
         $this->unique = false;
         $this->fields = array();
         parent::__construct($name);
index 04ac777cd49c9e46f11e90e1b94959e19179890d..bf77741cf349bafda0638a1723017209e18f39fa 100644 (file)
@@ -36,7 +36,7 @@ class xmldb_key extends xmldb_object {
     /**
      * Creates one new xmldb_key
      */
-    function __construct($name, $type=null, $fields=null, $reftable=null, $reffields=null) {
+    function __construct($name, $type=null, $fields=array(), $reftable=null, $reffields=null) {
         $this->type = NULL;
         $this->fields = array();
         $this->reftable = NULL;