mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Merge branch 'next-minor'
This commit is contained in:
@@ -148,10 +148,10 @@ class BanEntry{
|
||||
/**
|
||||
* @param string $date
|
||||
*
|
||||
* @return \DateTime|null
|
||||
* @return \DateTime
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
private static function parseDate(string $date) : ?\DateTime{
|
||||
private static function parseDate(string $date) : \DateTime{
|
||||
$datetime = \DateTime::createFromFormat(self::$format, $date);
|
||||
if(!($datetime instanceof \DateTime)){
|
||||
throw new \RuntimeException("Corrupted date/time: " . implode(", ", \DateTime::getLastErrors()["errors"]));
|
||||
|
Reference in New Issue
Block a user