<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\BaseModule;
use Friendica\Core\L10n;
use Friendica\Core\System;
-use Friendica\DI;
use Friendica\Module\Response;
+use Friendica\Module\Special\HTTPException as ModuleHTTPException;
use Friendica\Network\HTTPException;
use Friendica\Util\Profiler;
use Psr\Http\Message\ResponseInterface;
protected function content(array $request = []): string
{
- throw new HTTPException\NotFoundException(DI::l10n()->t('Page not found.'));
+ throw new HTTPException\NotFoundException($this->t('Page not found.'));
}
- public function run(array $request = []): ResponseInterface
+ public function run(ModuleHTTPException $httpException, array $request = []): ResponseInterface
{
/* The URL provided does not resolve to a valid module.
*
* Otherwise we are going to emit a 404 not found.
*/
$queryString = $this->server['QUERY_STRING'];
- // Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
+ // Stupid browser tried to pre-fetch our JavaScript img template. Don't log the event or return anything - just quietly exit.
if (!empty($queryString) && preg_match('/{[0-9]}/', $queryString) !== 0) {
System::exit();
}
'query' => $this->server['QUERY_STRING']
]);
- return parent::run($request); // TODO: Change the autogenerated stub
+ return parent::run($httpException, $request);
}
}