Explorar o código

Fix deprecation warning on PHP 8.1

Alexander M. Turek %!s(int64=4) %!d(string=hai) anos
pai
achega
2e37d0bbd1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Monolog/Logger.php

+ 1 - 1
src/Monolog/Logger.php

@@ -321,7 +321,7 @@ class Logger implements LoggerInterface, ResettableInterface
         if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
             $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
         } else {
-            $ts = new \DateTime(null, static::$timezone);
+            $ts = new \DateTime('now', static::$timezone);
         }
         $ts->setTimezone(static::$timezone);