Prevent page redirect on draft saving
Only an issue when using the non 'mysqlnd' extension. Fixes #120
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment