Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34416 closed defect (bug) (fixed)

Require the $namespace argument in register_rest_route()

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

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 9 years ago.
34416.2.diff (3.4 KB) - added by danielbachhuber 9 years ago.

Download all attachments as: .zip

Change History (9)

#1 @swissspidy
9 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.


9 years ago

#3 @danielbachhuber
9 years ago

  • Keywords commit added

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

#4 @rmccue
9 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.


9 years ago

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


9 years ago

#7 @rmccue
9 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.