WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

#26659 closed defect (bug) (fixed)

Notices in wp_notify_postauthor() when post_author = 0

Reported by: bpetty Owned by: nacin
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Mail Keywords: has-patch
Focuses: Cc:

Description

The comment AJAX tests currently fail because they fail to find a valid user account tied to the factory-generated comments while trying to send out notifications. This might still be something we would want to detect and handle in core, however, these tests shouldn't even be trying to send out notifications anyway, so this patch just disables them during these tests.

Attachments (2)

ticket-26659-ajax-tests.patch (2.7 KB) - added by bpetty 3 years ago.
26659-checking-added.patch (1.5 KB) - added by drozdz 2 years ago.
Added checking if author is not empty

Download all attachments as: .zip

Change History (8)

#1 @bpetty
3 years ago

  • Keywords has-patch added

This ticket was mentioned in IRC in #wordpress-dev by tierra. View the logs.


2 years ago

#3 @nacin
2 years ago

  • Component changed from Unit Tests to Mail
  • Keywords needs-patch added; has-patch removed
  • Summary changed from Turn off comment notifications during AJAX unit tests to Notices in wp_notify_postauthor() when post_author = 0

I think this is actually a bug in wp_notify_postauthor(). It should support post_author = 0.

#4 @bpetty
2 years ago

That's what I meant by "This might still be something we would want to detect and handle in core".

In any case, the unit tests should *still* disable comment notifications even if this did work properly. So I'd still like to see that handled.

@drozdz
2 years ago

Added checking if author is not empty

#5 @spmlucas
2 years ago

  • Keywords has-patch added; needs-patch removed

#6 @nacin
2 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 27568:

Avoid notices in wp_notify_postauthor() when a post has no author.

props drozdz.
fixes #26659.

Note: See TracTickets for help on using tickets.