|
14 | 14 | use Symfony\Component\VarDumper\Cloner\Stub;
|
15 | 15 |
|
16 | 16 | /**
|
17 |
| - * Casts pqsql resources to array representation. |
| 17 | + * Casts pgsql resources to array representation. |
18 | 18 | *
|
19 | 19 | * @author Nicolas Grekas <p@tchwork.com>
|
20 | 20 | *
|
@@ -142,9 +142,9 @@ public static function castResult($result, array $a, Stub $stub, bool $isNested)
|
142 | 142 | 'name' => pg_field_name($result, $i),
|
143 | 143 | 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)),
|
144 | 144 | 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)),
|
145 |
| - 'nullable' => (bool) pg_field_is_null($result, $i), |
| 145 | + 'nullable' => (bool) (\PHP_VERSION_ID >= 80300 ? pg_field_is_null($result, null, $i) : pg_field_is_null($result, $i)), |
146 | 146 | 'storage' => pg_field_size($result, $i).' bytes',
|
147 |
| - 'display' => pg_field_prtlen($result, $i).' chars', |
| 147 | + 'display' => \PHP_VERSION_ID >= 80300 ? pg_field_prtlen($result, null, $i) : pg_field_prtlen($result, $i), |
148 | 148 | ];
|
149 | 149 | if (' (OID: )' === $field['table']) {
|
150 | 150 | $field['table'] = null;
|
|
0 commit comments