WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 5 weeks 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 4 months ago.
26659-checking-added.patch (1.5 KB) - added by drozdz 2 months ago.
Added checking if author is not empty

Download all attachments as: .zip

Change History (8)

comment:1 bpetty4 months ago

  • Keywords has-patch added

comment:2 ircbot3 months ago

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

comment:3 nacin3 months 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.

comment:4 bpetty3 months 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.

drozdz2 months ago

Added checking if author is not empty

comment:5 spmlucas2 months ago

  • Keywords has-patch added; needs-patch removed

comment:6 nacin5 weeks 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.