mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Fixed bug preventing correct detection of enums under mysqli. MDL-14215 ; merged from 19_STABLE
This commit is contained in:
parent
05c75fcebf
commit
91703c7792
@ -555,6 +555,8 @@ class ADODB_mysqli extends ADOConnection {
|
||||
$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
|
||||
} elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
|
||||
$fld->type = $query_array[1];
|
||||
$arr = explode(",",$query_array[2]);
|
||||
$fld->enums = $arr;
|
||||
$fld->max_length = max(array_map("strlen",explode(",",$query_array[2]))) - 2; // PHP >= 4.0.6
|
||||
$fld->max_length = ($fld->max_length == 0 ? 1 : $fld->max_length);
|
||||
} else {
|
||||
@ -1128,4 +1130,4 @@ class ADORecordSet_array_mysqli extends ADORecordSet_array {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user