diff --git a/lib/xmldb/classes/XMLDBField.class.php b/lib/xmldb/classes/XMLDBField.class.php index b99a48c1412..309d5c7d3d6 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, ';