Skip to content

Commit d86e165

Browse files
committed
Attempt to fix stmt_attr_set
1 parent 09c6110 commit d86e165

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ext/mysqli/mysqli_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,13 +2260,13 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
22602260
#if MYSQL_VERSION_ID >= 50107
22612261
case STMT_ATTR_UPDATE_MAX_LENGTH:
22622262
{
2263-
my_bool mode_b;
2263+
//my_bool mode_b;
22642264
if (mode_in != 0 && mode_in != 1) {
22652265
zend_argument_value_error(ERROR_ARG_POS(3), "must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH");
22662266
RETURN_THROWS();
22672267
}
2268-
mode_b = (my_bool) mode_in;
2269-
mode_p = &mode_b;
2268+
mode = mode_in;//(my_bool) mode_in;
2269+
mode_p = &mode;
22702270
break;
22712271
}
22722272
#endif

ext/mysqli/tests/mysqli_stmt_attr_set.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ require_once("connect.inc");
7272
var_dump($stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 1));
7373
$res = $stmt->attr_get(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
7474
if ($res !== 1)
75+
var_dump($res);
7576
printf("[007.1] max_length should be 1, got %s\n", $res);
7677
$stmt->execute();
7778
$stmt->store_result();

0 commit comments

Comments
 (0)