Ticket #10525 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

post.php suppressed E_WARNING

Reported by: Mittineague Owned by:
Priority: low Milestone: 2.9
Component: Autosave Version:
Severity: minor Keywords: has-patch commit
Cc: allanh62@…

Description

Using the Error Reporting plugin I get

E_WARNING Couldn't find constant DOING_AUTOSAVE at ...../wp-includes/post.php (3471)

function wp_save_post_revision( $post_id ) {
	// We do autosaves manually with wp_create_post_autosave()
	if ( @constant( 'DOING_AUTOSAVE' ) )
		return;

Would it not be easy enough to do a defined() before the constant() and eliminate the need for suppression?

Attachments

10525.diff Download (453 bytes) - added by Denis-de-Bernardy 2 years ago.

Change History

  • Keywords has-patch added
  • Type changed from defect (bug) to enhancement
  • Milestone changed from Unassigned to 2.9
  • Keywords commit added

(trivial patch)

comment:3   ryan2 years ago

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.