* master:
Fixed issue #183 (TMP_VAR is not only used once)
Fix broken Junit output with --disable-cgi
Added folder mark
Further test fixes for the
fdb2709 breakage.
Fix broken test caused by
fdb2709.
Added tests for ZipArchive::addGlob() and ZipArchive::addPattern()
Fix run-tests.php with Valgrind >= 3.10.0.
Add microseconds to the serialised form of DateTime objects.
Improved test for bug #62479
fix typo in ODBC code
gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
5.5.14 now
Fix bug #67060: use default mode of 660
Conflicts:
ext/date/php_date.c
}
/* first we add the date and time in ISO format */
- ZVAL_STR(&zv, date_format("Y-m-d H:i:s", sizeof("Y-m-d H:i:s")-1, dateobj->time, 1 TSRMLS_CC));
- MAKE_STD_ZVAL(zv);
- ZVAL_STRING(zv, date_format("Y-m-d H:i:s.u", 14, dateobj->time, 1), 0);
- zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
++ ZVAL_STR(&zv, date_format("Y-m-d H:i:s.u", sizeof("Y-m-d H:i:s.u")-1, dateobj->time, 1 TSRMLS_CC));
+ zend_hash_str_update(props, "date", sizeof("date")-1, &zv);
/* then we add the timezone name (or similar) */
if (dateobj->time->is_localtime) {
string(6) "Y-m-d+"
string(19) "2001-11-29 13:20:01"
-object(DateTime)#2 (3) {
+object(DateTime)#%d (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
string(7) "Y-m-d +"
string(19) "2001-11-29 13:20:01"
-object(DateTime)#3 (3) {
+object(DateTime)#%d (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
string(6) "Y-m-d+"
string(10) "2001-11-29"
-object(DateTime)#2 (3) {
+object(DateTime)#%d (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
string(7) "Y-m-d +"
string(11) "2001-11-29 "
-object(DateTime)#2 (3) {
+object(DateTime)#%d (3) {
["date"]=>
- string(19) "2001-11-29 %d:%d:%d"
+ string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
ZEND_OP1(opline).var == var) {
- update_op1_const(op_array, opline, val TSRMLS_CC);
- /* TMP_VAR my be used only once */
- break;
+ /* In most cases IS_TMP_VAR operand may be used only once.
+ * The operands are usually destroyed by the opcode handler.
+ * ZEND_CASE is an exception, that keeps operand unchanged,
+ * and allows its reuse. The number of ZEND_CASE instructions
+ * usually terminated by ZEND_FREE that finally kills the value.
+ */
+ if (opline->opcode == ZEND_CASE) {
+ zval old_val;
- old_val = *val;
++ ZVAL_COPY_VALUE(&old_val, val);
+ zval_copy_ctor(val);
+ update_op1_const(op_array, opline, val TSRMLS_CC);
- *val = old_val;
++ ZVAL_COPY_VALUE(val, &old_val);
+ } else if (opline->opcode == ZEND_FREE) {
+ MAKE_NOP(opline);
+ break;
+ } else {
+ update_op1_const(op_array, opline, val TSRMLS_CC);
+ val = NULL;
+ break;
+ }
}
if (ZEND_OP2_TYPE(opline) == IS_TMP_VAR &&
}
/* If I add more options, it would make sense to create a nice static struct and loop over it. */
- if ((options = zend_hash_str_find(HASH_OF(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
- if (zend_hash_find(HASH_OF(options), "remove_path", sizeof("remove_path"), (void **)&option) == SUCCESS) {
- if (Z_TYPE_PP(option) != IS_STRING) {
++ if ((option = zend_hash_str_find(HASH_OF(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
+ if (Z_TYPE_P(option) != IS_STRING) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "remove_path option expected to be a string");
return -1;
}