use proper macros and vars instead of strlen()

This commit is contained in:
Antony Dovgal 2005-10-10 20:06:35 +00:00
parent a5cea052e8
commit 062626d03e
2 changed files with 2 additions and 2 deletions

View File

@ -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]);

View File

@ -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 {