XMLDB_UNSIGNED only applicable to number types. MDL-11662

Merged from MOODLE_19_STABLE
This commit is contained in:
stronk7 2007-12-08 18:20:15 +00:00
parent 9ce2fe53cb
commit 051b9588d1

View File

@ -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, ';