We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e19f79 commit 450bf38Copy full SHA for 450bf38
1 file changed
system/Database/OCI8/Connection.php
@@ -349,12 +349,25 @@ protected function _fieldData(string $table): array
349
$retval[$i]->max_length = $length;
350
351
$retval[$i]->nullable = $query[$i]->NULLABLE === 'Y';
352
- $retval[$i]->default = rtrim($query[$i]->DATA_DEFAULT);
+ $retval[$i]->default = $this->normalizeDefault($query[$i]->DATA_DEFAULT);
353
}
354
355
return $retval;
356
357
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
371
/**
372
* Returns an array of objects with index data
373
*
0 commit comments