Fix error message and add UPGRADING entry

This commit is contained in:
Kamil Tekiela 2024-08-19 13:19:49 +02:00
parent 8f1c430954
commit 4baf6a643b
No known key found for this signature in database
GPG Key ID: 0760BDAB1E89A1E3
4 changed files with 8 additions and 6 deletions

View File

@ -874,6 +874,8 @@ PHP 8.4 UPGRADE NOTES
- Mysqli:
. The unused and undocumented constant MYSQLI_SET_CHARSET_DIR
has been removed.
. The MYSQLI_STMT_ATTR_PREFETCH_ROWS constant has been removed.
The feature is unavailable with mysqlnd.
- OpenSSL:
. The OpenSSL extension now requires at least OpenSSL 1.1.1.

View File

@ -1752,8 +1752,8 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
mode_p = &mode;
break;
default:
zend_argument_value_error(ERROR_ARG_POS(2), "must be one of "
"MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or STMT_ATTR_CURSOR_TYPE");
zend_argument_value_error(ERROR_ARG_POS(2), "must be either "
"MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or MYSQLI_STMT_ATTR_CURSOR_TYPE");
RETURN_THROWS();
}
@ -1783,8 +1783,8 @@ PHP_FUNCTION(mysqli_stmt_attr_get)
if ((rc = mysql_stmt_attr_get(stmt->stmt, attr, &value))) {
/* Success corresponds to 0 return value and a non-zero value
* should only happen if the attr/option is unknown */
zend_argument_value_error(ERROR_ARG_POS(2), "must be one of "
"MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or STMT_ATTR_CURSOR_TYPE");
zend_argument_value_error(ERROR_ARG_POS(2), "must be either "
"MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or MYSQLI_STMT_ATTR_CURSOR_TYPE");
RETURN_THROWS();
}

View File

@ -50,7 +50,7 @@ require_once 'skipifconnectfailure.inc';
require_once 'clean_table.inc';
?>
--EXPECT--
mysqli_stmt_attr_get(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or STMT_ATTR_CURSOR_TYPE
mysqli_stmt_attr_get(): Argument #2 ($attribute) must be either MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or MYSQLI_STMT_ATTR_CURSOR_TYPE
mysqli_stmt object is already closed
mysqli_stmt object is already closed
done!

View File

@ -169,7 +169,7 @@ require_once 'skipifconnectfailure.inc';
?>
--EXPECT--
Error: mysqli_stmt object is not fully initialized
mysqli_stmt_attr_set(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or STMT_ATTR_CURSOR_TYPE
mysqli_stmt_attr_set(): Argument #2 ($attribute) must be either MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH or MYSQLI_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 ($value) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE