Hacker News new | ask | show | jobs
by melomac 4078 days ago
I was surprised there is no plugin to limit the size of a comment, so I ended up editing `wp-comments-post.php` line 129 from:

if ( '' == $comment_content ) {

to:

if ( '' == $comment_content || 32768 < strlen($comment_content) ) {

1 comments

I was surprised that the PHP database access layer doesn't throw an error and aborts the transaction (like the other DAL I know would do).