[wp-trac] [WordPress Trac] #10377: Comment fields should have max lengths

WordPress Trac noreply at wordpress.org
Fri Sep 4 04:20:06 UTC 2015


#10377: Comment fields should have max lengths
------------------------------+--------------------------
 Reporter:  muriloazevedo     |       Owner:  rachelbaker
     Type:  defect (bug)      |      Status:  accepted
 Priority:  normal            |   Milestone:  4.4
Component:  Comments          |     Version:  2.8
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------------

Comment (by pento):

 Replying to [comment:13 chriscct7]:
 > I don't know if that's worth the extra db call. Someone could just as
 easily use the filter to modify it if that's the case

 It's not an extra call - the same call will be done later when the data is
 actually being written to the DB.

 I agree with @SergeyBiryukov, `$wpdb->get_col_length()` is a better way of
 making sure it's the right length.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/10377#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list