Caused by a refactoring strtotime() called
zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ...) instead of
zend_parse_parameters().
timelib_time *t, *now;
timelib_tzinfo *tzi;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "s|l", ×, &time_len, &preset_ts) == FAILURE || !time_len) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", ×, &time_len, &preset_ts) == FAILURE || !time_len) {
RETURN_FALSE;
}
--- /dev/null
+--TEST--
+Bug #70245 (strtotime does not emit warning when 2nd parameter is object or string)
+--FILE--
+<?php
+$d = new DateTime('2011-01-15 00:00:00');
+var_dump(strtotime('-1 month', $d));
+?>
+--EXPECTF--
+Warning: strtotime() expects parameter 2 to be integer, object given in %sbug70245.php on line %d
+bool(false)