mirror of
https://github.com/php/php-src.git
synced 2026-04-14 19:41:05 +02:00
From now on, we always display the given object's type instead of just reporting "object". Additionally, make the format of return type errors match the format of argument errors. Closes GH-5625
14 lines
340 B
PHP
14 lines
340 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');
|
|
try {
|
|
var_dump(strtotime('-1 month', $d));
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
strtotime(): Argument #2 ($now) must be of type ?int, DateTime given
|