mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #76755 (setcookie does not accept "double" type for expire time)
This commit is contained in:
parent
2aa3733daa
commit
d61ff37f45
3 changed files with 13 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -12,6 +12,10 @@ PHP NEWS
|
|||
. Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar
|
||||
file). (Laruence)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76755 (setcookie does not accept "double" type for expire time).
|
||||
(Laruence)
|
||||
|
||||
16 Aug 2018, PHP 7.3.0beta2
|
||||
|
||||
- Core:
|
||||
|
|
|
@ -286,7 +286,7 @@ PHP_FUNCTION(setcookie)
|
|||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
expires = Z_LVAL_P(expires_or_options);
|
||||
expires = zval_get_long(expires_or_options);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
8
ext/standard/tests/network/bug76755.phpt
Normal file
8
ext/standard/tests/network/bug76755.phpt
Normal file
|
@ -0,0 +1,8 @@
|
|||
--TEST--
|
||||
Bug #76755 (setcookie does not accept "double" type for expire time)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(setcookie('name', 'value', (real)(time() + 1296000)));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
Loading…
Add table
Add a link
Reference in a new issue