Changeset 13986 for trunk/src/bp-messages/bp-messages-functions.php
- Timestamp:
- 07/27/2024 07:16:17 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-messages/bp-messages-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-functions.php
r13890 r13986 57 57 ); 58 58 59 // Check if the message content is empty. 60 $content = $r['content']; 61 $empty_content = false; 62 63 // Any string is considered non-empty. 64 if ( ! is_string( $content ) || '' === $content ) { 65 $empty_content = true; 66 } 67 59 68 // Bail if no sender or no content. 60 if ( empty( $r['sender_id'] ) || empty( $r['content'] )) {69 if ( empty( $r['sender_id'] ) || $empty_content ) { 61 70 if ( 'wp_error' === $r['error_type'] ) { 62 71 if ( empty( $r['sender_id'] ) ) { … … 69 78 70 79 return new WP_Error( $error_code, $feedback ); 71 72 } else { 73 return false; 74 } 80 } 81 82 return false; 75 83 } 76 84
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)