Skip to content
Prev Previous commit
Next Next commit
64049: Skip content-emptiness check if content key is not present in …
…comment object

Permits patch updates which modify non-content values without incorrectly failing a partial object for having "empty" content
  • Loading branch information
kadamwhite committed Sep 29, 2025
commit 96de3d9d50662f6a9165b846fd77872dd2761d03
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,10 @@ public function check_comment_author_email( $value, $request, $param ) {
* @return bool True if the content is allowed, false otherwise.
*/
protected function check_is_comment_content_allowed( $prepared_comment ) {
if ( ! isset( $prepared_comment['comment_content'] ) ) {
return true;
}

$check = wp_parse_args(
$prepared_comment,
array(
Expand Down
Loading