diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-31 11:51:54 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-03 09:17:12 +0200 |
| commit | 1df8175b6153865e2f12394792e3ad4c7c8e48ea (patch) | |
| tree | 7a5dc832d7457a180570e298761abf946dbabe3a /ext/pgsql/tests | |
| parent | 29d79dc2e55844cb42f975ef2f0c21aedbfef183 (diff) | |
| download | php-git-1df8175b6153865e2f12394792e3ad4c7c8e48ea.tar.gz | |
Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
Diffstat (limited to 'ext/pgsql/tests')
| -rw-r--r-- | ext/pgsql/tests/bug72197.phpt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pgsql/tests/bug72197.phpt b/ext/pgsql/tests/bug72197.phpt index bf9c16978b..7732bfddfc 100644 --- a/ext/pgsql/tests/bug72197.phpt +++ b/ext/pgsql/tests/bug72197.phpt @@ -7,7 +7,11 @@ Bug #72197 pg_lo_create arbitrary read /* This shouldn't crash. */ $var1=-32768; $var2="12"; -pg_lo_create($var1, $var2); +try { + pg_lo_create($var1, $var2); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} /* This should work correctly. */ include('config.inc'); @@ -28,7 +32,7 @@ pg_close($conn); ?> ==DONE== --EXPECTF-- -Warning: pg_lo_create(): supplied resource is not a valid PostgreSQL link resource in %sbug72197.php on line %d%w +pg_lo_create(): supplied resource is not a valid PostgreSQL link resource%w int(%d) int(%d) ==DONE== |
