Skip to content

Changed the wording of the error message #6137

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
6 changes: 3 additions & 3 deletions ext/mysqli/mysqli_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,9 @@ PHP_FUNCTION(mysqli_data_seek)

if (mysqli_result_is_unbuffered(result)) {
if (getThis()) {
zend_throw_error(NULL, "mysqli_result::data_seek() cannot be used with MYSQLI_USE_RESULT");
zend_throw_error(NULL, "mysqli_result::data_seek() cannot be used in MYSQLI_USE_RESULT mode");
} else {
zend_throw_error(NULL, "mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT");
zend_throw_error(NULL, "mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode");
}
RETURN_THROWS();
}
Expand Down Expand Up @@ -1626,7 +1626,7 @@ PHP_FUNCTION(mysqli_num_rows)
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);

if (mysqli_result_is_unbuffered_and_not_everything_is_fetched(result)) {
zend_throw_error(NULL, "mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT");
zend_throw_error(NULL, "mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode");
RETURN_THROWS();
}

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/bug55582.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ require_once("connect.inc");
?>
--EXPECT--
bool(true)
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
array(1) {
[1]=>
string(1) "1"
}
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
NULL
int(1)
done
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_data_seek.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ require_once('skipifconnectfailure.inc');
?>
--EXPECT--
mysqli_data_seek(): Argument #2 ($offset) must be greater than or equal to 0
mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT
mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode
mysqli_result object is already closed
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_data_seek_oo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ require_once('skipifconnectfailure.inc');
--EXPECT--
mysqli_result object is already closed
mysqli_result::data_seek(): Argument #1 ($offset) must be greater than or equal to 0
mysqli_result::data_seek() cannot be used with MYSQLI_USE_RESULT
mysqli_result::data_seek() cannot be used in MYSQLI_USE_RESULT mode
mysqli_result object is already closed
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_num_rows.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ mysqli_result object is already closed
mysqli_result object is already closed
mysqli_result object is already closed
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
mysqli_num_rows() cannot be used with MYSQLI_USE_RESULT
mysqli_num_rows() cannot be used in MYSQLI_USE_RESULT mode
done!
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_use_result.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECT--
mysqli_data_seek() cannot be used with MYSQLI_USE_RESULT
mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode
mysqli object is already closed
done!