Dan Brown

Prevent page redirect on draft saving

Only an issue when using the non 'mysqlnd' extension.
Fixes #120
...@@ -92,7 +92,7 @@ class PageController extends Controller ...@@ -92,7 +92,7 @@ class PageController extends Controller
92 92
93 $draftPage = $this->pageRepo->getById($pageId, true); 93 $draftPage = $this->pageRepo->getById($pageId, true);
94 94
95 - $chapterId = $draftPage->chapter_id; 95 + $chapterId = intval($draftPage->chapter_id);
96 $parent = $chapterId !== 0 ? $this->chapterRepo->getById($chapterId) : $book; 96 $parent = $chapterId !== 0 ? $this->chapterRepo->getById($chapterId) : $book;
97 $this->checkOwnablePermission('page-create', $parent); 97 $this->checkOwnablePermission('page-create', $parent);
98 98
......