Skip to content

oci8: Fix two tests that fail with stricter internal checks. #5230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/oci8/tests/array_bind_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ oci_bind_array_by_name() and invalid values 9
require __DIR__.'/connect.inc';

var_dump(oci_bind_array_by_name($c, ":c1", $array, 5, 5, SQLT_CHR));

echo "Done\n";
?>
--EXPECTF--
Warning: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)
Done
Fatal error: Uncaught TypeError: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s:%d
Stack trace:
#0 %s: oci_bind_array_by_name(%s)
#1 {main}
thrown in %s on line %d
10 changes: 7 additions & 3 deletions ext/oci8/tests/array_bind_013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ $statement = oci_parse($c, 'SELECT user FROM v$session');

$array = array();

var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10));
try {
var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10));
} catch (ArgumentCountError $exception) {
echo $exception->getMessage() . "\n";
}

var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10));
var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -1));
var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, 0));
Expand All @@ -23,8 +28,7 @@ var_dump($array);
echo "Done\n";
?>
--EXPECTF--
Warning: oci_bind_array_by_name() expects at most 6 parameters, 7 given in %s on line %d
NULL
oci_bind_array_by_name() expects at most 6 parameters, 7 given

Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d
bool(false)
Expand Down