Skip to content

Commit 0d99a56

Browse files
kamil-tekielanikic
authored andcommitted
Changed the wording of the error message
"cannot be used in MYSQLI_USE_RESULT mode" sounds more correct than "cannot be used with MYSQLI_USE_RESULT" Closes GH-6137.
1 parent f08e666 commit 0d99a56

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

ext/mysqli/mysqli_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,9 +740,9 @@ PHP_FUNCTION(mysqli_data_seek)
740740

741741
if (mysqli_result_is_unbuffered(result)) {
742742
if (getThis()) {
743-
zend_throw_error(NULL, "mysqli_result::data_seek() cannot be used with MYSQLI_USE_RESULT");
743+
zend_throw_error(NULL, "mysqli_result::data_seek() cannot be used in MYSQLI_USE_RESULT mode");
744744
} else {
745-
zend_throw_error(NULL, "mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT");
745+
zend_throw_error(NULL, "mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode");
746746
}
747747
RETURN_THROWS();
748748
}
@@ -1626,7 +1626,7 @@ PHP_FUNCTION(mysqli_num_rows)
16261626
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
16271627

16281628
if (mysqli_result_is_unbuffered_and_not_everything_is_fetched(result)) {
1629-
zend_throw_error(NULL, "mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT");
1629+
zend_throw_error(NULL, "mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode");
16301630
RETURN_THROWS();
16311631
}
16321632

ext/mysqli/tests/bug55582.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ require_once("connect.inc");
3434
?>
3535
--EXPECT--
3636
bool(true)
37-
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
37+
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
3838
array(1) {
3939
[1]=>
4040
string(1) "1"
4141
}
42-
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
42+
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
4343
NULL
4444
int(1)
4545
done

ext/mysqli/tests/mysqli_data_seek.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ require_once('skipifconnectfailure.inc');
6666
?>
6767
--EXPECT--
6868
mysqli_data_seek(): Argument #2 ($offset) must be greater than or equal to 0
69-
mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT
69+
mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode
7070
mysqli_result object is already closed
7171
done!

ext/mysqli/tests/mysqli_data_seek_oo.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ require_once('skipifconnectfailure.inc');
7878
--EXPECT--
7979
mysqli_result object is already closed
8080
mysqli_result::data_seek(): Argument #1 ($offset) must be greater than or equal to 0
81-
mysqli_result::data_seek() cannot be used with MYSQLI_USE_RESULT
81+
mysqli_result::data_seek() cannot be used in MYSQLI_USE_RESULT mode
8282
mysqli_result object is already closed
8383
done!

ext/mysqli/tests/mysqli_num_rows.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ mysqli_result object is already closed
8080
mysqli_result object is already closed
8181
mysqli_result object is already closed
8282
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
83-
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
83+
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
8484
done!

ext/mysqli/tests/mysqli_use_result.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ require_once('skipifconnectfailure.inc');
5656
require_once("clean_table.inc");
5757
?>
5858
--EXPECT--
59-
mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT
59+
mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode
6060
mysqli object is already closed
6161
done!

0 commit comments

Comments
 (0)