Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#26659 closed defect (bug) (fixed)

Notices in wp_notify_postauthor() when post_author = 0

Reported by: bpetty's profile bpetty Owned by: nacin's profile 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 11 years ago.
26659-checking-added.patch (1.5 KB) - added by drozdz 11 years ago.
Added checking if author is not empty

Download all attachments as: .zip

Change History (8)

#1 @bpetty
11 years ago

  • Keywords has-patch added

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


11 years ago

#3 @nacin
11 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
11 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
11 years ago

Added checking if author is not empty

#5 @spmlucas
11 years ago

  • Keywords has-patch added; needs-patch removed

#6 @nacin
10 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.