]> git.mxchange.org Git - friendica.git/commitdiff
Mute calles of trigger_error()
authorArt4 <art4@wlabs.de>
Fri, 31 Jan 2025 15:35:07 +0000 (15:35 +0000)
committerArt4 <art4@wlabs.de>
Fri, 31 Jan 2025 15:35:07 +0000 (15:35 +0000)
src/Core/Logger.php
src/DI.php

index a050f7e2451dea00e58657528aa63d2df07eb703..e10b9f2ef4995ab575616b7214865034a274202d 100644 (file)
@@ -34,7 +34,7 @@ class Logger
         */
        public static function emergency(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->emergency($message, $context);
        }
@@ -53,7 +53,7 @@ class Logger
         */
        public static function alert(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->alert($message, $context);
        }
@@ -71,7 +71,7 @@ class Logger
         */
        public static function critical(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->critical($message, $context);
        }
@@ -88,7 +88,7 @@ class Logger
         */
        public static function error(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->error($message, $context);
        }
@@ -107,7 +107,7 @@ class Logger
         */
        public static function warning(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->warning($message, $context);
        }
@@ -123,7 +123,7 @@ class Logger
         */
        public static function notice(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->notice($message, $context);
        }
@@ -142,7 +142,7 @@ class Logger
         */
        public static function info(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->info($message, $context);
        }
@@ -158,7 +158,7 @@ class Logger
         */
        public static function debug(string $message, array $context = [])
        {
-               trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
 
                self::getInstance()->debug($message, $context);
        }
index 405735e168545acb89679e74cb3fbadb4b90b52e..94bb4c308acb57d4fd8225f6ec49c6021b4ee823 100644 (file)
@@ -332,7 +332,7 @@ abstract class DI
         */
        public static function workerLogger()
        {
-               trigger_error('`' . __METHOD__ . '()` is deprecated since 2025.02 and will be removed after 5 months, use `DI::logger()` instead.', E_USER_DEPRECATED);
+               @trigger_error('`' . __METHOD__ . '()` is deprecated since 2025.02 and will be removed after 5 months, use `DI::logger()` instead.', E_USER_DEPRECATED);
 
                return self::$dice->create(Core\Logger\Type\WorkerLogger::class);
        }