php-src/ext/date/tests/bug70245.phpt
Christoph M. Becker 3b874086e2 Fix #70245: strtotime does not emit warning when 2nd parameter is object or string
Caused by a refactoring strtotime() called
zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ...) instead of
zend_parse_parameters().
2015-08-12 19:01:04 +02:00

11 lines
312 B
PHP

--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)