]> git.mxchange.org Git - friendica.git/blobdiff - bin/console.php
Merge remote-tracking branch 'upstream/develop' into error-handling
[friendica.git] / bin / console.php
index 4d5b4c79c2894f679239bf039dda6655c711036c..8305176157661a4dc5f5e345d95a97d9094a2dc8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -20,6 +20,8 @@
  *
  */
 
+use Friendica\Network\HTTPException\ForbiddenException;
+
 if (php_sapi_name() !== 'cli') {
        header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
        exit();
@@ -33,4 +35,6 @@ require dirname(__DIR__) . '/vendor/autoload.php';
 $dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
 $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]);
 
+\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
+
 (new Friendica\Core\Console($dice, $argv))->execute();