[GIT-PULLS] [php-src] PR #23480: ext/pgsql: stop advertising PGSQL_DML_ASYNC where it is refused

[email protected] (lacatoire)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23480
Author: lacatoire

`pg_update()` and `pg_delete()` reject `PGSQL_DML_ASYNC` in their option mask but then name it in the error message as an accepted flag:

```c
if (option & ~(PGSQL_CONV_OPTS|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
    zend_argument_value_error(5, "must be a valid bit mask of PGSQL_CONV_FORCE_NULL, PGSQL_DML_NO_CONV, "
        "PGSQL_DML_ESCAPE, PGSQL_DML_EXEC, PGSQL_DML_ASYNC, and PGSQL_DML_STRING");
```

The fix removes `PGSQL_DML_ASYNC` from the two error messages. `pg_insert()` and `pg_select()` accept the flag and keep their existing wording unchanged.

A second defect is fixed in the same file: the `ZEND_ASSERT` inside `php_pgsql_delete()` excluded `PGSQL_DML_NO_CONV`, but its caller `pg_delete()` accepts that bit and passes it through untouched — the helper consults it four lines below the assert. The assert is widened to match the actual accepted mask.

A new test (`ext/pgsql/tests/pg_dml_option_flags.phpt`) covers the corrected error messages and the `pg_delete()`/`PGSQL_DML_NO_CONV` path.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.