We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d2b7b4d + 2c5355b commit c44f619Copy full SHA for c44f619
Classes/Controller/CommentController.php
@@ -51,8 +51,12 @@ protected function initializeAction()
51
* @throws NodeException
52
* @throws ConnectionException
53
*/
54
- public function createAction(NodeInterface $postNode, NodeTemplate $newComment): string
+ public function createAction(NodeInterface $postNode = null, NodeTemplate $newComment = null): string
55
{
56
+ if ($postNode === null || $newComment === null) {
57
+ $this->throwStatus(400, 'Required parameters missing');
58
+ }
59
+
60
# Workaround until we can validate node templates properly:
61
if (strlen((string)$newComment->getProperty('author')) < 2) {
62
$this->throwStatus(400, 'Your comment was NOT created - please specify your name.');
0 commit comments