From: stronk7 Date: Sat, 8 Dec 2007 18:20:15 +0000 (+0000) Subject: XMLDB_UNSIGNED only applicable to number types. MDL-11662 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=051b9588d1bcb1a240233f1a6092bd31ab83a747;p=moodle.git XMLDB_UNSIGNED only applicable to number types. MDL-11662 Merged from MOODLE_19_STABLE --- 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, ';