This commit is contained in:
Dennis Eichhorn 2023-08-28 22:06:35 +00:00
parent f4a73bfd7b
commit 69b823eafa
2 changed files with 5 additions and 7 deletions

View File

@ -382,12 +382,12 @@ final class ApiController extends Controller
*/
private function updateBoardFromRequest(RequestAbstract $request, KanbanBoard $new) : KanbanBoard
{
$new->name = (string) ($request->getData('title') ?? $new->name);
$new->description = Markdown::parse((string) ($request->getData('plain') ?? $new->descriptionRaw));
$new->descriptionRaw = (string) ($request->getData('plain') ?? $new->descriptionRaw);
$new->name = $request->getDataString('title') ?? $new->name;
$new->description = Markdown::parse($request->getDataString('plain') ?? $new->descriptionRaw);
$new->descriptionRaw = $request->getDataString('plain') ?? $new->descriptionRaw;
$new->order = $request->getDataInt('order') ?? $new->order;
$new->setStatus($request->getDataInt('status') ?? $new->getStatus());
$new->style = (string) ($request->getData('style') ?? $new->style);
$new->style = $request->getDataString('style') ?? $new->style;
return $new;
}

View File

@ -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';