[php-src] PR #24217: ext/pgsql: fix wrong names and values in three diagnostics
| From: | lacatoire | Date: | Fri, 09 Oct 2026 14:45:10 +0000 |
| Subject: | [php-src] PR #24217: ext/pgsql: fix wrong names and values in three diagnostics | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39285@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24217
Author: lacatoire
- The "Unable to jump to row" warning of
pg_fetch_result(),
pg_fetch_row()/assoc()/array()/object(),
pg_field_prtlen() and pg_field_is_null() printed Z_LVAL_P()
of a PgSql\Result object as a "result index", i.e. the object address. The
operand is dropped.
- pg_lo_write() referred to a nonexistent $buf parameter; it is
$data.
- pg_lo_read() is the only check worded "greater or equal than"; use
"greater than or equal to" like the rest of the file.
Before (master):
```
Warning: pg_fetch_row(): Unable to jump to row 99 on PostgreSQL result index 133586556570360 in ...
pg_lo_write(): Argument #3 ($length) must be less than or equal to the length of argument #2 ($buf)
pg_lo_read(): Argument #2 ($length) must be greater or equal than 0
```
After:
```
Warning: pg_fetch_row(): Unable to jump to row 99 in ...
pg_lo_write(): Argument #3 ($length) must be less than or equal to the length of argument #2 ($data)
pg_lo_read(): Argument #2 ($length) must be greater than or equal to 0
```
ext/pgsql/tests on PostgreSQL 16: 99 passed, 0 failed. Added
pg_error_message_text.phpt, which fails on master; updated
pg_lo_write_null_bytes.phpt.