- πΈπ°Slovakia poker10
Similar function (
node_access()
) does verify the node object:if (!$node || !in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) { // If there was no node to check against, or the $op was not one of the // supported ones, we return access denied. return FALSE; }
We can probably do the same and check if the comment is not empty.
if (!$comment) { return FALSE; }
I think this would be sufficient, as node module does not verify if the
nid
is numeric either. It would be great to add a simple test for this along with the simplification of the patch mentioned earlier. Thanks!