diff options
Diffstat (limited to 'src/controller/ArticleController.php')
-rw-r--r-- | src/controller/ArticleController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/controller/ArticleController.php b/src/controller/ArticleController.php index 71bfdc3..b8af290 100644 --- a/src/controller/ArticleController.php +++ b/src/controller/ArticleController.php | |||
@@ -32,7 +32,10 @@ class ArticleController | |||
32 | if($id[0] === 'n') | 32 | if($id[0] === 'n') |
33 | { | 33 | { |
34 | $section_id = (int)substr($id, 1); // id du bloc <section> | 34 | $section_id = (int)substr($id, 1); // id du bloc <section> |
35 | $director->findNodeById($section_id); | 35 | if(!$director->findNodeById($section_id)){ |
36 | echo json_encode(['success' => false, 'error' => 'article_not_saved']); | ||
37 | die; | ||
38 | } | ||
36 | $director->makeSectionNode(); | 39 | $director->makeSectionNode(); |
37 | $node = $director->getNode(); // = <section> | 40 | $node = $director->getNode(); // = <section> |
38 | 41 | ||