Skip to content

Commit 34c71f8

Browse files
committed
date: Use true / false instead of 1 / 0 for bool parameters
Changes done with Coccinelle: @r1@ identifier F; identifier p; typedef bool; parameter list [n1] PL1; parameter list [n2] PL2; @@ F(PL1, bool p, PL2) { ... } @r2@ identifier r1.F; expression list [r1.n1] EL1; expression list [r1.n2] EL2; @@ F(EL1, ( - 1 + true | - 0 + false ) , EL2)
1 parent fb91931 commit 34c71f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ static void date_object_to_hash(php_date_obj *dateobj, HashTable *props)
18981898
zval zv;
18991899

19001900
/* first we add the date and time in ISO format */
1901-
ZVAL_STR(&zv, date_format("x-m-d H:i:s.u", sizeof("x-m-d H:i:s.u")-1, dateobj->time, 1));
1901+
ZVAL_STR(&zv, date_format("x-m-d H:i:s.u", sizeof("x-m-d H:i:s.u")-1, dateobj->time, true));
19021902
zend_hash_str_update(props, "date", sizeof("date")-1, &zv);
19031903

19041904
/* then we add the timezone name (or similar) */

0 commit comments

Comments
 (0)