From: tjhunt Date: Tue, 18 Nov 2008 07:29:45 +0000 (+0000) Subject: xmldb: MDL-17262 warnings and fatal error when trying to create a unique key or index. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c51c43a092eed605b959d42247a0a83f216ea2b4;p=moodle.git xmldb: MDL-17262 warnings and fatal error when trying to create a unique key or index. --- diff --git a/lib/xmldb/xmldb_index.php b/lib/xmldb/xmldb_index.php index 255aec4e39..b4d6d2b713 100644 --- a/lib/xmldb/xmldb_index.php +++ b/lib/xmldb/xmldb_index.php @@ -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); diff --git a/lib/xmldb/xmldb_key.php b/lib/xmldb/xmldb_key.php index 04ac777cd4..bf77741cf3 100644 --- a/lib/xmldb/xmldb_key.php +++ b/lib/xmldb/xmldb_key.php @@ -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;