Commit 40a3bd7a authored by Marcelo Rivera's avatar Marcelo Rivera Committed by Mark Harding
Browse files

(fix): Call to a member function getEntityGuid() on null

parent 1eb4781d
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -347,7 +347,14 @@ class comments implements Interfaces\Api

        $comment = $manager->getByLuid($pages[0]);

        if ($comment && $comment->canEdit()) {
        if (!$comment) {
            return Factory::response([
                'status' => 'error',
                'message' => 'Comment not found',
            ]);
        }

        if ($comment->canEdit()) {
            $manager->delete($comment);
            return Factory::response([]);
        }