WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#34416 closed defect (bug) (fixed)

Require the $namespace argument in register_rest_route()

Reported by: danielbachhuber Owned by: rmccue
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch commit
Focuses: Cc:
PR Number:

Description

Per discussion on Slack, we should return true on success, and add a _doing_it_wrong() and return false if the $namespace parameter is empty.

Originally https://github.com/WP-API/WP-API/issues/1505

Attachments (2)

34416.1.diff (3.4 KB) - added by danielbachhuber 4 years ago.
34416.2.diff (3.4 KB) - added by danielbachhuber 4 years ago.

Download all attachments as: .zip

Change History (9)

#1 @swissspidy
4 years ago

Is the WPAPI-2.0 version intentional? Does it make sense to change that to 4.4? See also #34249

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


4 years ago

#3 @danielbachhuber
4 years ago

  • Keywords commit added

34416.2.diff refreshes the patch and changes the version to 4.4.0

#4 @rmccue
4 years ago

  • Owner set to rmccue
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.


4 years ago

This ticket was mentioned in Slack in #core-restapi by rmccue. View the logs.


4 years ago

#7 @rmccue
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35651:

REST API: Require namespace when registering routes.

Props danielbachhuber.
Fixes #34416.

Note: See TracTickets for help on using tickets.