We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46d62e5 commit b2a33abCopy full SHA for b2a33ab
NEWS
@@ -2,6 +2,9 @@ PHP NEWS
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
?? ??? ????, PHP 7.3.23
4
5
+- Calendar:
6
+ . Fixed bug #80007 (Potential type confusion in unixtojd() parameter parsing).
7
+ (Andy Postnikov)
8
9
03 Sep 2020, PHP 7.3.22
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