mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
use proper macros and vars instead of strlen()
This commit is contained in:
parent
a5cea052e8
commit
062626d03e
@ -571,7 +571,7 @@ PHP_FUNCTION(mysqli_stmt_execute)
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
convert_to_string_ex(&stmt->param.vars[i]);
|
||||
stmt->stmt->params[i].buffer = Z_STRVAL_PP(&stmt->param.vars[i]);
|
||||
stmt->stmt->params[i].buffer_length = strlen(Z_STRVAL_PP(&stmt->param.vars[i]));
|
||||
stmt->stmt->params[i].buffer_length = Z_STRLEN_PP(&stmt->param.vars[i]);
|
||||
break;
|
||||
case MYSQL_TYPE_DOUBLE:
|
||||
convert_to_double_ex(&stmt->param.vars[i]);
|
||||
|
@ -75,7 +75,7 @@ PHP_FUNCTION(mysqli_connect)
|
||||
}
|
||||
|
||||
#ifdef HAVE_EMBEDDED_MYSQLI
|
||||
if (hostname && strlen(hostname)) {
|
||||
if (hostname_len && hostname) {
|
||||
unsigned int external=1;
|
||||
mysql_options(mysql->mysql, MYSQL_OPT_USE_REMOTE_CONNECTION, (char *)&external);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user