diff options
Diffstat (limited to 'ext/date/tests/bug70245.phpt')
-rw-r--r-- | ext/date/tests/bug70245.phpt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt index f754bf65a1..b480192326 100644 --- a/ext/date/tests/bug70245.phpt +++ b/ext/date/tests/bug70245.phpt @@ -3,8 +3,11 @@ Bug #70245 (strtotime does not emit warning when 2nd parameter is object or stri --FILE-- <?php $d = new DateTime('2011-01-15 00:00:00'); -var_dump(strtotime('-1 month', $d)); +try { + var_dump(strtotime('-1 month', $d)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> --EXPECTF-- -Warning: strtotime() expects parameter 2 to be int, object given in %sbug70245.php on line %d -bool(false) +strtotime() expects parameter 2 to be int, object given |