We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1b21b56 + b2a33ab commit 81fffa8Copy full SHA for 81fffa8
NEWS
@@ -2,6 +2,9 @@ PHP NEWS
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
?? ??? 2020, PHP 7.4.11
4
5
+- Calendar:
6
+ . Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
7
+ (Andy Postnikov)
8
9
03 Sep 2020, PHP 7.4.10
10
ext/calendar/cal_unix.c
@@ -28,15 +28,18 @@
28
PHP_FUNCTION(unixtojd)
29
{
30
time_t ts = 0;
31
+ zend_long tl = 0;
32
struct tm *ta, tmbuf;
33
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &ts) == FAILURE) {
34
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &tl) == FAILURE) {
35
return;
36
}
37
- if (!ts) {
38
+ if (!tl) {
39
ts = time(NULL);
- } else if (ts < 0) {
40
+ } else if (tl >= 0) {
41
+ ts = (time_t) tl;
42
+ } else {
43
RETURN_FALSE;
44
45
0 commit comments