summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug70245.phpt
blob: b45e8be931163f03cde57088a4e3a337c2c5889d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--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');
try {
    var_dump(strtotime('-1 month', $d));
} catch (TypeError $e) {
    echo $e->getMessage(), "\n";
}
?>
--EXPECT--
strtotime(): Argument #2 ($now) must be of type ?int, object given