From e2ecc7c6cc5066e6ecfe97f8cb55cd10c5799611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Mon, 23 Jul 2012 20:48:14 +0200 Subject: [PATCH] MDL-34475 add default value to xmldb_field hash calculation --- lib/xmldb/xmldb_field.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xmldb/xmldb_field.php b/lib/xmldb/xmldb_field.php index ce919d92bb1..7c69407e5a6 100644 --- a/lib/xmldb/xmldb_field.php +++ b/lib/xmldb/xmldb_field.php @@ -493,9 +493,10 @@ class xmldb_field extends xmldb_object { if (!$this->loaded) { $this->hash = null; } else { + $defaulthash = is_null($this->default) ? '' : sha1($this->default); $key = $this->name . $this->type . $this->length . $this->notnull . $this->sequence . - $this->decimals . $this->comment; + $this->decimals . $this->comment . $defaulthash; $this->hash = md5($key); } }