From 27172dbc0b41bbfa368a90900719919e638f9dd7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 28 Aug 2023 22:06:34 +0000 Subject: [PATCH] update --- Controller/ApiController.php | 2 +- Controller/BackendController.php | 2 +- tests/Autoloader.php | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index d7235e4..5bf995f 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -665,7 +665,7 @@ final class ApiController extends Controller private function createReportFromRequest(RequestAbstract $request, ResponseAbstract $response, int $collectionId) : Report { $helperReport = new Report(); - $helperReport->title = (string) ($request->getData('name')); + $helperReport->title = $request->getDataString('name') ?? ''; $helperReport->source = new NullCollection($collectionId); $helperReport->template = new NullTemplate((int) $request->getData('template')); $helperReport->createdBy = new NullAccount($request->header->account); diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 297fd97..4c4328a 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -56,7 +56,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Helper/Theme/Backend/helper-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response); - $path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/')); + $path = \str_replace('+', ' ', $request->getDataString('path') ?? '/'); $templates = TemplateMapper::getAll() ->with('createdBy') ->with('tags') diff --git a/tests/Autoloader.php b/tests/Autoloader.php index 80a0a1e..d2d0080 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -71,14 +71,12 @@ final class Autoloader * * @return void * - * @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation. - * * @since 1.0.0 */ public static function defaultAutoloader(string $class) : void { $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = \strtr($class, '_\\', '//'); foreach (self::$paths as $path) { $file = $path . $class . '.php';