Skip to content

Commit 777f11c

Browse files
committed
Revert "Drop test about invalid bool value for attr"
This reverts commit 8d4d181.
1 parent 3a7eaa1 commit 777f11c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/mysqli/tests/mysqli_stmt_attr_set.phpt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ require_once("connect.inc");
3939
} catch (\ValueError $e) {
4040
echo $e->getMessage() . \PHP_EOL;
4141
}
42+
// Invalid mode for MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
43+
try {
44+
$stmt->attr_set(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, -1);
45+
} catch (\ValueError $e) {
46+
echo $e->getMessage() . \PHP_EOL;
47+
}
4248
$stmt->close();
4349

4450
//
@@ -249,6 +255,7 @@ require_once("connect.inc");
249255
--EXPECT--
250256
Error: mysqli_stmt object is not fully initialized
251257
mysqli_stmt_attr_set(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
258+
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
252259
bool(true)
253260
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
254261
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS

0 commit comments

Comments
 (0)