Skip to content

Commit e1c422c

Browse files
committed
Try to fix 32-bit setcookie tests, again
1 parent 4c43806 commit e1c422c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

ext/standard/tests/network/setcookie_array_option_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ try {
4848
if (PHP_INT_SIZE == 8) {
4949
try {
5050
// To go above year 9999: 60 * 60 * 24 * 365 * 9999
51-
setrawcookie('name', 'value', ['expires' => 315328464000]);
51+
setcookie('name', 'value', ['expires' => 315328464000]);
5252
} catch (\ValueError $e) {
5353
var_dump($e->getMessage() == 'setcookie(): "expires" option cannot have a year greater than 9999');
5454
}
@@ -66,7 +66,7 @@ setcookie(): option "foo" is invalid
6666
setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
6767
setcookie(): "domain" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
6868
setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array
69-
bool(false)
69+
bool(true)
7070
array(1) {
7171
[0]=>
7272
string(%s) "X-Powered-By: PHP/%s"

ext/standard/tests/network/setrawcookie_error.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ try {
2222
} catch (\ValueError $e) {
2323
echo $e->getMessage() . "\n";
2424
}
25-
// To go above year 9999: 60 * 60 * 24 * 365 * 9999
26-
try {
27-
setrawcookie('name', 'value', 315328464000);
28-
} catch (\ValueError $e) {
29-
echo $e->getMessage() . "\n";
30-
}
3125
try {
3226
setrawcookie('name', 'value', 100, 'invalid;');
3327
} catch (\ValueError $e) {
@@ -59,7 +53,6 @@ var_dump(headers_list());
5953
setrawcookie(): Argument #1 ($name) cannot be empty
6054
setrawcookie(): Argument #1 ($name) cannot contain "=", ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
6155
setrawcookie(): Argument #2 ($value) cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
62-
setrawcookie(): "expires" option cannot have a year greater than 9999
6356
setrawcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
6457
setrawcookie(): "domain" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
6558
bool(true)

0 commit comments

Comments
 (0)