Changeset 7397
- Timestamp:
- 02/18/2026 06:49:42 PM (5 weeks ago)
- File:
-
- 1 edited
-
trunk/src/includes/common/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r7396 r7397 2805 2805 * Is a title longer that the maximum title length? 2806 2806 * 2807 * Uses mb_strlen() in `8bit` mode to treat strings as raw. This matches the 2808 * behavior present in Comments, PHPMailer, RandomCompat, and others. 2807 * Uses mb_strlen() in `utf-8` mode to treat strings as is. This differs from 2808 * the behavior present in Comments, PHPMailer, RandomCompat, and others, 2809 * because the database column used by titles (posts.post_title) is 2810 * TEXT (characters) and not VARCHAR (bytes). 2809 2811 * 2810 2812 * @since 2.6.0 bbPress (r6783) … … 2815 2817 function bbp_is_title_too_long( $title = '' ) { 2816 2818 $max = bbp_get_title_max_length(); 2817 $len = mb_strlen( $title, ' 8bit' );2819 $len = mb_strlen( $title, 'utf-8' ); 2818 2820 $result = ( $len > $max ); 2819 2821
Note: See TracChangeset
for help on using the changeset viewer.