From 5ca737b8def10aa131b793925493d2a3887f9e07 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 5 Aug 2015 18:09:08 -0600 Subject: [PATCH] ensure we don't change page type when it's empty --- classes/controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/controller.php b/classes/controller.php index 1abc3c6a..7665e51f 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -1107,8 +1107,8 @@ class AdminController $page->folder($ordering . $slug); - if (isset($input['type'])) { - $type = (string) $input['type']; + if (isset($input['type']) && !empty($input['type'])) { + $type = (string) strtolower($input['type']); $name = preg_replace('|.*/|', '', $type) . '.md'; $page->name($name); $page->template($type);