File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -349,12 +349,25 @@ protected function _fieldData(string $table): array
349349 $ retval [$ i ]->max_length = $ length ;
350350
351351 $ retval [$ i ]->nullable = $ query [$ i ]->NULLABLE === 'Y ' ;
352- $ retval [$ i ]->default = rtrim ($ query [$ i ]->DATA_DEFAULT );
352+ $ retval [$ i ]->default = $ this -> normalizeDefault ($ query [$ i ]->DATA_DEFAULT );
353353 }
354354
355355 return $ retval ;
356356 }
357357
358+ /**
359+ * Removes trailing whitespace from default values
360+ * returned in database column metadata queries.
361+ */
362+ private function normalizeDefault (?string $ default ): ?string
363+ {
364+ if ($ default === null ) {
365+ return $ default ;
366+ }
367+
368+ return rtrim ($ default );
369+ }
370+
358371 /**
359372 * Returns an array of objects with index data
360373 *
You can’t perform that action at this time.
0 commit comments