From 41959faefdff108cbc501c00adcb42b4c6d1b019 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 28 Aug 2023 22:06:33 +0000 Subject: [PATCH] update --- Controller/ApiController.php | 2 +- tests/Autoloader.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0ab10da..97a478e 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -402,7 +402,7 @@ final class ApiController extends Controller { $new->title = $request->getDataString('title') ?? $new->title; $new->contentRaw = $request->getDataString('plain') ?? $new->contentRaw; - $new->content = Markdown::parse((string) ($request->getData('plain') ?? $new->contentRaw)); + $new->content = Markdown::parse($request->getDataString('plain') ?? $new->contentRaw); $new->ref = $request->getDataInt('ref') ?? $new->ref; return $new; 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';