Skip to content

Commit 851236c

Browse files
vrananicolas-grekas
authored andcommitted
[VarDumper] Avoid deprecated call in PgSqlCaster
1 parent 0d226b1 commit 851236c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\VarDumper\Cloner\Stub;
1515

1616
/**
17-
* Casts pqsql resources to array representation.
17+
* Casts pgsql resources to array representation.
1818
*
1919
* @author Nicolas Grekas <p@tchwork.com>
2020
*
@@ -142,9 +142,9 @@ public static function castResult($result, array $a, Stub $stub, bool $isNested)
142142
'name' => pg_field_name($result, $i),
143143
'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)),
144144
'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)),
146146
'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),
148148
];
149149
if (' (OID: )' === $field['table']) {
150150
$field['table'] = null;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy