From: Dmitry Stogov Date: Fri, 7 Mar 2014 13:06:13 +0000 (+0400) Subject: Fixed string length X-Git-Tag: POST_PHPNG_MERGE~412^2~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97156bc141fe1cd87d4b19ef71f26fc7cb3d7f90;p=php Fixed string length --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index adfb2ca64e..3c582b27e2 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2197,7 +2197,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) } /* first we add the date and time in ISO format */ - ZVAL_STR(&zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1)); + ZVAL_STR(&zv, date_format("Y-m-d H:i:s", sizeof("Y-m-d H:i:s")-1, dateobj->time, 1)); zend_hash_str_update(props, "date", sizeof("date")-1, &zv); /* then we add the timezone name (or similar) */