Skip to content

Commit 5adeed3

Browse files
committed
ext/psql: pg_meta_data, extended mode, fix typo for pseudo typtype.
Closes GH-10865.
1 parent 53763e1 commit 5adeed3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Diff for: NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ PHP NEWS
3333
. Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit().
3434
(nielsdos)
3535

36+
- PGSQL:
37+
. Fixed typo in the array returned from pg_meta_data (extended mode).
38+
(David Carlier)
39+
3640
- SPL:
3741
. Fixed bug GH-10519 (Array Data Address Reference Issue). (Nathan Freeman)
3842

Diff for: ext/pgsql/pgsql.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4343,7 +4343,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string
43434343
/* pg_type.typtype */
43444344
add_assoc_bool_ex(&elem, "is base", sizeof("is base") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "b"));
43454345
add_assoc_bool_ex(&elem, "is composite", sizeof("is composite") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "c"));
4346-
add_assoc_bool_ex(&elem, "is pesudo", sizeof("is pesudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p"));
4346+
add_assoc_bool_ex(&elem, "is pseudo", sizeof("is pseudo") - 1, !strcmp(PQgetvalue(pg_result, i, 7), "p"));
43474347
/* pg_description.description */
43484348
add_assoc_string_ex(&elem, "description", sizeof("description") - 1, PQgetvalue(pg_result, i, 8));
43494349
}

Diff for: ext/pgsql/tests/pg_meta_data_001.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ array(2) {
122122
bool(true)
123123
["is composite"]=>
124124
bool(false)
125-
["is pesudo"]=>
125+
["is pseudo"]=>
126126
bool(false)
127127
["description"]=>
128128
string(0) ""
@@ -147,7 +147,7 @@ array(2) {
147147
bool(true)
148148
["is composite"]=>
149149
bool(false)
150-
["is pesudo"]=>
150+
["is pseudo"]=>
151151
bool(false)
152152
["description"]=>
153153
string(0) ""

0 commit comments

Comments
 (0)