Skip to content

Commit 3a986ac

Browse files
committed
Address review comments
1 parent 30c9a4e commit 3a986ac

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

ext/mysqli/mysqli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ PHP_METHOD(mysqli_result, __construct)
10251025
}
10261026

10271027
if (resmode != MYSQLI_STORE_RESULT && resmode != MYSQLI_USE_RESULT) {
1028-
zend_argument_value_error(2, "must be MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT");
1028+
zend_argument_value_error(2, "must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT");
10291029
RETURN_THROWS();
10301030
}
10311031

ext/mysqli/mysqli_api.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ PHP_FUNCTION(mysqli_stmt_bind_param)
332332

333333
if (types_len != (size_t) argc) {
334334
/* number of bind variables doesn't match number of elements in type definition string */
335-
zend_argument_count_error("Number of elements in type definition string doesn't match number of bind variables");
335+
zend_argument_count_error("The number of elements in the type definition string must match the number of bind variables");
336336
RETURN_THROWS();
337337
}
338338

339339
if (types_len != mysql_stmt_param_count(stmt->stmt)) {
340-
zend_argument_count_error("Number of variables doesn't match number of parameters in prepared statement");
340+
zend_argument_count_error("The number of variables must match the number of parameters in the prepared statement");
341341
RETURN_THROWS();
342342
}
343343

@@ -739,13 +739,12 @@ PHP_FUNCTION(mysqli_data_seek)
739739
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
740740

741741
if (mysqli_result_is_unbuffered(result)) {
742-
// TODO Promoto to Exception?
742+
// TODO Promote to Exception?
743743
php_error_docref(NULL, E_WARNING, "Function cannot be used with MYSQL_USE_RESULT");
744744
RETURN_FALSE;
745745
}
746746

747747
if ((uint64_t)offset >= mysql_num_rows(result)) {
748-
// TODO Warning/Exception?
749748
RETURN_FALSE;
750749
}
751750

ext/mysqli/tests/mysqli_result_invalid_mode.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ require_once('skipifconnectfailure.inc');
2626
require_once("clean_table.inc");
2727
?>
2828
--EXPECT--
29-
mysqli_result::__construct(): Argument #2 ($result_mode) must be MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT
30-
mysqli_result::__construct(): Argument #2 ($result_mode) must be MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT
29+
mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT
30+
mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT

ext/mysqli/tests/mysqli_stmt_bind_param.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ require_once('skipifconnectfailure.inc');
416416
require_once("clean_table.inc");
417417
?>
418418
--EXPECTF--
419-
Number of variables doesn't match number of parameters in prepared statement
419+
The number of variables must match the number of parameters in the prepared statement
420420
mysqli_stmt_bind_param(): Argument #2 ($types) cannot be empty
421-
Number of elements in type definition string doesn't match number of bind variables
422-
Number of variables doesn't match number of parameters in prepared statement
423-
Number of elements in type definition string doesn't match number of bind variables
424-
Number of variables doesn't match number of parameters in prepared statement
425-
Number of elements in type definition string doesn't match number of bind variables
421+
The number of elements in the type definition string must match the number of bind variables
422+
The number of variables must match the number of parameters in the prepared statement
423+
The number of elements in the type definition string must match the number of bind variables
424+
The number of variables must match the number of parameters in the prepared statement
425+
The number of elements in the type definition string must match the number of bind variables
426426

427427
Warning: mysqli_stmt_bind_param(): Undefined fieldtype a (parameter 3) in %s on line %d
428428

ext/mysqli/tests/mysqli_stmt_field_count.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ require_once('skipifconnectfailure.inc');
9898
--EXPECT--
9999
mysqli_stmt object is not fully initialized
100100
mysqli_stmt object is not fully initialized
101-
Number of variables doesn't match number of parameters in prepared statement
101+
The number of variables must match the number of parameters in the prepared statement
102102
mysqli_stmt object is already closed
103103
mysqli_stmt object is already closed
104104
done!

0 commit comments

Comments
 (0)