Skip to content

Commit baab111

Browse files
committed
Rename mysqli parameters to be more logical.
1 parent 36ed996 commit baab111

16 files changed

+277
-293
lines changed

ext/mysqli/mysqli.stub.php

Lines changed: 127 additions & 127 deletions
Large diffs are not rendered by default.

ext/mysqli/mysqli_arginfo.h

Lines changed: 124 additions & 140 deletions
Large diffs are not rendered by default.

ext/mysqli/tests/mysqli_fetch_all_oo.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,6 @@ array(1) {
435435
string(1) "1"
436436
}
437437
}
438-
mysqli_result::fetch_all(): Argument #1 ($result_type) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH
438+
mysqli_result::fetch_all(): Argument #1 ($mode) must be one of MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC, or MYSQLI_FETCH_BOTH
439439
mysqli_result object is already closed
440440
done!

ext/mysqli/tests/mysqli_fetch_array.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ array(11) {
359359
["e"]=>
360360
string(1) "1"
361361
}
362-
mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
363-
mysqli_fetch_array(): Argument #2 ($fetchtype) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
362+
mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
363+
mysqli_fetch_array(): Argument #2 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
364364
mysqli_result object is already closed
365365
done!

ext/mysqli/tests/mysqli_fetch_array_oo.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ array(11) {
355355
["e"]=>
356356
string(1) "1"
357357
}
358-
mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
359-
mysqli_result::fetch_array(): Argument #1 ($result_type) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
358+
mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
359+
mysqli_result::fetch_array(): Argument #1 ($mode) must be one of MYSQLI_NUM, MYSQLI_ASSOC, or MYSQLI_BOTH
360360
mysqli_result object is already closed
361361
done!

ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc');
5757
?>
5858
--EXPECTF--
5959
mysqli object is not fully initialized
60-
mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be greater than or equal to 0
60+
mysqli_result::fetch_field_direct(): Argument #1 ($index) must be greater than or equal to 0
6161
object(stdClass)#%d (13) {
6262
["name"]=>
6363
string(2) "ID"
@@ -86,6 +86,6 @@ object(stdClass)#%d (13) {
8686
["decimals"]=>
8787
int(%d)
8888
}
89-
mysqli_result::fetch_field_direct(): Argument #1 ($field_nr) must be less than the number of fields for this result set
89+
mysqli_result::fetch_field_direct(): Argument #1 ($index) must be less than the number of fields for this result set
9090
mysqli_result object is already closed
9191
done!

ext/mysqli/tests/mysqli_fetch_object.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,5 @@ NULL
148148
NULL
149149
mysqli_result object is already closed
150150
[0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d
151-
mysqli_fetch_object(): Argument #2 ($class_name) must be a valid class name, this_class_does_not_exist given
151+
mysqli_fetch_object(): Argument #2 ($class) must be a valid class name, this_class_does_not_exist given
152152
done!

ext/mysqli/tests/mysqli_fetch_object_oo.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,5 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr
139139
NULL
140140
NULL
141141
mysqli_result object is already closed
142-
mysqli_result::fetch_object(): Argument #1 ($class_name) must be a valid class name, this_class_does_not_exist given
142+
mysqli_result::fetch_object(): Argument #1 ($class) must be a valid class name, this_class_does_not_exist given
143143
done!

ext/mysqli/tests/mysqli_field_seek.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ require_once('skipifconnectfailure.inc');
122122
require_once("clean_table.inc");
123123
?>
124124
--EXPECTF--
125-
mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0
125+
mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0
126126
object(stdClass)#%d (13) {
127127
["name"]=>
128128
string(2) "id"
@@ -210,7 +210,7 @@ object(stdClass)#%d (13) {
210210
int(0)
211211
}
212212
int(2)
213-
mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set
213+
mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set
214214
bool(false)
215215
bool(true)
216216
object(stdClass)#%d (13) {

ext/mysqli/tests/mysqli_field_tell.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ object(stdClass)#%d (13) {
8888
}
8989
bool(false)
9090
int(1)
91-
mysqli_field_seek(): Argument #2 ($field_nr) must be less than the number of fields for this result set
91+
mysqli_field_seek(): Argument #2 ($index) must be less than the number of fields for this result set
9292
int(1)
93-
mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0
93+
mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0
9494
int(1)
9595
bool(true)
9696
int(0)

ext/mysqli/tests/mysqli_kill.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ require_once('skipifconnectfailure.inc');
8080
require_once("clean_table.inc");
8181
?>
8282
--EXPECTF--
83-
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
83+
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
8484
string(%d) "%s"
8585
bool(false)
8686
object(mysqli)#%d (%d) {
@@ -131,10 +131,10 @@ object(mysqli)#%d (%d) {
131131
["warning_count"]=>
132132
int(0)
133133
}
134-
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
134+
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
135135
array(1) {
136136
["id"]=>
137137
string(1) "1"
138138
}
139-
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
139+
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
140140
done!

ext/mysqli/tests/mysqli_poll.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ if (!$IS_MYSQLND)
114114
print "done!";
115115
?>
116116
--EXPECTF--
117-
mysqli_poll(): Argument #4 ($sec) must be greater than or equal to 0
118-
mysqli_poll(): Argument #5 ($usec) must be greater than or equal to 0
117+
mysqli_poll(): Argument #4 ($seconds) must be greater than or equal to 0
118+
mysqli_poll(): Argument #5 ($microseconds) must be greater than or equal to 0
119119
[012 + 6] Rejecting thread %d: 0/
120120
[013 + 6] Rejecting thread %d: 0/
121121
[014 + 6] Rejecting thread %d: 0/

ext/mysqli/tests/mysqli_report.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ require_once('skipifconnectfailure.inc');
287287
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
288288

289289
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
290-
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
290+
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
291291

292292
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
293293

294294
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
295-
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
295+
mysqli_kill(): Argument #2 ($process_id) must be greater than 0
296296

297297
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
298298
[013] Access denied for user '%s'@'%s' (using password: YES)

ext/mysqli/tests/mysqli_stmt_attr_get.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ require_once('skipifconnectfailure.inc');
5252
require_once("clean_table.inc");
5353
?>
5454
--EXPECT--
55-
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
55+
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
5656
mysqli_stmt object is already closed
5757
mysqli_stmt object is already closed
5858
mysqli_stmt object is already closed

ext/mysqli/tests/mysqli_stmt_attr_set.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ require_once("connect.inc");
242242
?>
243243
--EXPECT--
244244
Error: mysqli_stmt object is not fully initialized
245-
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
246-
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
245+
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
246+
mysqli_stmt::attr_set(): Argument #2 ($value) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
247247
bool(true)
248-
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
249-
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
248+
mysqli_stmt::attr_set(): Argument #2 ($value) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
249+
mysqli_stmt::attr_set(): Argument #2 ($value) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
250250
done!

ext/mysqli/tests/mysqli_stmt_send_long_data.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,5 @@ require_once('skipifconnectfailure.inc');
108108
require_once("clean_table.inc");
109109
?>
110110
--EXPECT--
111-
mysqli_stmt_send_long_data(): Argument #2 ($param_nr) must be greater than or equal to 0
111+
mysqli_stmt_send_long_data(): Argument #2 ($index) must be greater than or equal to 0
112112
done!

0 commit comments

Comments
 (0)