Skip to content

Rename mysqli parameters to be more logical. #6172

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
wants to merge 2 commits into from
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
254 changes: 127 additions & 127 deletions ext/mysqli/mysqli.stub.php

Large diffs are not rendered by default.

264 changes: 124 additions & 140 deletions ext/mysqli/mysqli_arginfo.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_fetch_all_oo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,6 @@ array(1) {
string(1) "1"
}
}
mysqli_result::fetch_all(): Argument #1 ($result_type) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH
mysqli_result::fetch_all(): Argument #1 ($mode) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH
mysqli_result object is already closed
done!
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_fetch_array.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ array(11) {
["e"]=>
string(1) "1"
}
mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_result object is already closed
done!
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_fetch_array_oo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ array(11) {
["e"]=>
string(1) "1"
}
mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
mysqli_result object is already closed
done!
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc');
?>
--EXPECTF--
mysqli object is not fully initialized
mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be greater than or equal to 0
mysqli_result::fetch_field_direct(): Argument #1 ($index) must be greater than or equal to 0
object(stdClass)#%d (13) {
["name"]=>
string(2) "ID"
Expand Down Expand Up @@ -86,6 +86,6 @@ object(stdClass)#%d (13) {
["decimals"]=>
int(%d)
}
mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be less than the number of fields for this result set
mysqli_result::fetch_field_direct(): Argument #1 ($index) must be less than the number of fields for this result set
mysqli_result object is already closed
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_fetch_object.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ NULL
NULL
mysqli_result object is already closed
[0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d
mysqli_fetch_object(): Argument #2 ($class_name) must be a valid class name, this_class_does_not_exist given
mysqli_fetch_object(): Argument #2 ($class) must be a valid class name, this_class_does_not_exist given
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_fetch_object_oo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,5 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr
NULL
NULL
mysqli_result object is already closed
mysqli_result::fetch_object(): Argument #1 ($class_name) must be a valid class name, this_class_does_not_exist given
mysqli_result::fetch_object(): Argument #1 ($class) must be a valid class name, this_class_does_not_exist given
done!
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_field_seek.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0
mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0
object(stdClass)#%d (13) {
["name"]=>
string(2) "id"
Expand Down Expand Up @@ -210,7 +210,7 @@ object(stdClass)#%d (13) {
int(0)
}
int(2)
mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set
mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set
bool(false)
bool(true)
object(stdClass)#%d (13) {
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_field_tell.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ object(stdClass)#%d (13) {
}
bool(false)
int(1)
mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set
mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set
int(1)
mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0
mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0
int(1)
bool(true)
int(0)
Expand Down
6 changes: 3 additions & 3 deletions ext/mysqli/tests/mysqli_kill.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
string(%d) "%s"
bool(false)
object(mysqli)#%d (%d) {
Expand Down Expand Up @@ -131,10 +131,10 @@ object(mysqli)#%d (%d) {
["warning_count"]=>
int(0)
}
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
array(1) {
["id"]=>
string(1) "1"
}
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
done!
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_poll.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ if (!$IS_MYSQLND)
print "done!";
?>
--EXPECTF--
mysqli_poll(): Argument #4 ($sec) must be greater than or equal to 0
mysqli_poll(): Argument #5 ($usec) must be greater than or equal to 0
mysqli_poll(): Argument #4 ($seconds) must be greater than or equal to 0
mysqli_poll(): Argument #5 ($microseconds) must be greater than or equal to 0
[012 + 6] Rejecting thread %d: 0/
[013 + 6] Rejecting thread %d: 0/
[014 + 6] Rejecting thread %d: 0/
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/mysqli_report.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ require_once('skipifconnectfailure.inc');
Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d

Warning: mysqli_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
mysqli_kill(): Argument #2 ($process_id) must be greater than 0

Warning: mysqli_prepare(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d

Warning: mysqli_real_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
mysqli_kill(): Argument #2 ($process_id) must be greater than 0

Warning: mysqli_stmt_prepare(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d
[013] Access denied for user '%s'@'%s' (using password: YES)
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_stmt_attr_get.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt_attr_get(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
mysqli_stmt_attr_get(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
mysqli_stmt object is already closed
mysqli_stmt object is already closed
mysqli_stmt object is already closed
Expand Down
8 changes: 4 additions & 4 deletions ext/mysqli/tests/mysqli_stmt_attr_set.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ require_once("connect.inc");
?>
--EXPECT--
Error: mysqli_stmt object is not fully initialized
mysqli_stmt_attr_set(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
mysqli_stmt_attr_set(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
mysqli_stmt::attr_set(): Argument #2 ($value) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
bool(true)
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
mysqli_stmt::attr_set(): Argument #2 ($value) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
mysqli_stmt::attr_set(): Argument #2 ($value) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt_send_long_data(): Argument #2 ($param_nr) must be greater than or equal to 0
mysqli_stmt_send_long_data(): Argument #2 ($param_num) must be greater than or equal to 0
done!