Преглед изворни кода

Fix deprecation warning on PHP 8.1

Alexander M. Turek пре 4 година
родитељ
комит
2e37d0bbd1
1 измењених фајлова са 1 додато и 1 уклоњено
  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);