Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32515 closed defect (bug) (fixed)

Don't declare class properties readonly if they're written to later

Reported by: morganestes Owned by: wonderboymusic
Priority: normal Milestone: 4.3
Component: Posts, Post Types Version: 4.2
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description (last modified by netweb)

Introduced in r31127, WP_Post::page_template is declared read-only, but is written to inside the class. This updates the docblock so my IDE quits yelling at me that I'm writing to a read-only property.

Attachments (1)

32515.diff​ (462 bytes ) - added by morganestes 11 years ago.

Download all attachments as: .zip

Change History (4)

@morganestes
11 years ago

#1 @DrewAPicture
11 years ago

  • Component Editor → Posts, Post Types
  • Keywords has-patch added
  • Milestone Awaiting Review → 4.3
  • Owner set to wonderboymusic
  • Status new → reviewing

#2 @netweb
11 years ago

  • Description modified (diff)

#3 @wonderboymusic
11 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 32729:

page_template should be annotated as @property, not @property-read in WP_Post. The property is set on an instance in wp_insert_post()

Props morganestes.
Fixes #32515.

Note: See TracTickets for help on using tickets.