File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6329,7 +6329,7 @@ PHP_FUNCTION(pg_close_stmt)
6329
6329
ZEND_PARSE_PARAMETERS_END ();
6330
6330
6331
6331
if (ZSTR_LEN (stmt ) == 0 ) {
6332
- zend_argument_value_error ( 2 , "cannot be empty" );
6332
+ zend_argument_must_not_be_empty_error ( 2 );
6333
6333
RETURN_THROWS ();
6334
6334
}
6335
6335
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ $db = pg_connect($conn_str);
18
18
$ res = pg_prepare ($ db , 'test ' , $ query );
19
19
20
20
$ res = pg_execute ($ db , 'test ' , $ params_null );
21
+ try {
22
+ pg_close_stmt ($ db , '' );
23
+ } catch (\ValueError $ e ) {
24
+ echo $ e ->getMessage (), PHP_EOL ;
25
+ }
21
26
$ res = pg_close_stmt ($ db , 'test ' );
22
27
var_dump ($ res !== false );
23
28
var_dump (pg_result_status ($ res ) === PGSQL_COMMAND_OK );
@@ -29,5 +34,6 @@ pg_close($db);
29
34
30
35
?>
31
36
--EXPECT--
37
+ pg_close_stmt(): Argument #1 ($stmt) must not be empty
32
38
bool(true)
33
39
bool(true)
You can’t perform that action at this time.
0 commit comments