Skip to content

Commit

Permalink
fix: return value for empty values in SaveReason and UpdateSpamLog
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Mar 17, 2024
1 parent 349a481 commit 4137147
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/PostProcessors/SaveReason.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public static function process( $item ) {
}

if ( ! isset( $item['asb_reasons'] ) ) {
return $item['asb_post_processors_failed'][] = self::get_slug();
$item['asb_post_processors_failed'][] = self::get_slug();
return $item;
}

add_action(
Expand Down
3 changes: 2 additions & 1 deletion src/PostProcessors/UpdateSpamLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class UpdateSpamLog extends Base {

public static function process( $item ) {
if ( ! isset( $item['comment_post_ID'] ) || ! isset( $item['comment_author_IP'] ) ) {
return $item['asb_post_processors_failed'][] = self::get_slug();
$item['asb_post_processors_failed'][] = self::get_slug();
return $item;
}

if (
Expand Down

0 comments on commit 4137147

Please sign in to comment.