Skip to content

Commit 9ef6812

Browse files
committed
Potential fix for #434
1 parent f94f825 commit 9ef6812

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedColumn.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public function __construct(String $name, String $type, int $length, int $precis
3434
public static function fromReflection(GenericReflection $reflection, array $columnResult): ReflectedColumn
3535
{
3636
$name = $columnResult['COLUMN_NAME'];
37-
$length = $columnResult['CHARACTER_MAXIMUM_LENGTH'] + 0;
37+
$length = (int) $columnResult['CHARACTER_MAXIMUM_LENGTH'];
3838
$type = $reflection->toJdbcType($columnResult['DATA_TYPE'], $length);
39-
$precision = $columnResult['NUMERIC_PRECISION'] + 0;
40-
$scale = $columnResult['NUMERIC_SCALE'] + 0;
39+
$precision = (int) $columnResult['NUMERIC_PRECISION'];
40+
$scale = (int) $columnResult['NUMERIC_SCALE'];
4141
$nullable = in_array(strtoupper($columnResult['IS_NULLABLE']), ['TRUE', 'YES', 'T', 'Y', '1']);
4242
$pk = false;
4343
$fk = '';

0 commit comments

Comments
 (0)