From 051b9588d1bcb1a240233f1a6092bd31ab83a747 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 8 Dec 2007 18:20:15 +0000 Subject: [PATCH] XMLDB_UNSIGNED only applicable to number types. MDL-11662 Merged from MOODLE_19_STABLE --- lib/xmldb/classes/XMLDBField.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/xmldb/classes/XMLDBField.class.php b/lib/xmldb/classes/XMLDBField.class.php index b99a48c141..309d5c7d3d 100644 --- a/lib/xmldb/classes/XMLDBField.class.php +++ b/lib/xmldb/classes/XMLDBField.class.php @@ -789,9 +789,10 @@ class XMLDBField extends XMLDBObject { } else { $result .= 'null, '; } - /// Unsigned + /// Unsigned (only applicable to numbers) $unsigned = $this->getUnsigned(); - if (!empty($unsigned)) { + if (!empty($unsigned) && + ($this->getType() == XMLDB_TYPE_INTEGER || $this->getType() == XMLDB_TYPE_NUMBER || $this->getType() == XMLDB_TYPE_FLOAT)) { $result .= 'XMLDB_UNSIGNED' . ', '; } else { $result .= 'null, '; -- 2.39.5