Bug #67118 crashes in DateTime when this used after failed __construct
--INI--
date.timezone=Europe/Berlin
--FILE--
@ -11,17 +11,17 @@ class mydt extends datetime
if (!empty($tz) && !is_object($tz)) {
$tz = new DateTimeZone($tz);
}
@parent::__construct($time, $tz);
try {
@parent::__construct($time, $tz);
} catch (Exception $e) {
echo "Bad date" . $this->format("Y") . "\n";
}
}
};
new mydt("Funktionsansvarig rådgivning och juridik", "UTC");
?>
--EXPECTF--
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Funktionsansvarig rådgivning och juridik) at position 0 (F): The timezone could not be found in the database' in %sbug67118.php:%d