Field mapping for mySQLi query not working correctly
When creating a query with a field type of text, the mapping breaks. It tries to find an index in the var $fieldType, wich is just overwritten with none existing index.
case Base\Field::TYPE_TEXT:
if ((($fieldLength = $tableField->getMaxSize ()) <= 255) && ($fieldLength !== null))
$fieldType = 'TINY';
elseif ($fieldLength <= 65535)
$fieldType = '';
elseif ($fieldLength <= 16777215)
$fieldType = 'MEDIUM';
else
$fieldType = 'LONG';
$fieldType .= $typeMap [$fieldType];
# On Text: [BINARY] [CHARACTER SET charset_name] [COLLATE collation_name]
break;
https://gitlab.quarxconnect.de/quarxconnect.de/qcBase/-/blob/main/src/Catalog/mySQLi.php#L358
As the new values are prefixes something like this might to the trick:
case Base\Field::TYPE_TEXT:
if ((($fieldLength = $tableField->getMaxSize ()) <= 255) && ($fieldLength !== null))
$fieldTypePreFix = 'TINY';
elseif ($fieldLength <= 65535)
$fieldTypePreFix = '';
elseif ($fieldLength <= 16777215)
$fieldTypePreFix = 'MEDIUM';
else
$fieldTypePreFix = 'LONG';
$fieldType = $fieldTypePreFix . $typeMap [$fieldType];
# On Text: [BINARY] [CHARACTER SET charset_name] [COLLATE collation_name]
break;