[wp-trac] [WordPress Trac] #61580: WP_REST_Templates_Controller::get_wp_templates_author_text_field() doesn't always return value

WordPress Trac noreply at wordpress.org
Fri Jul 5 20:53:21 UTC 2024


#61580: WP_REST_Templates_Controller::get_wp_templates_author_text_field() doesn't
always return value
---------------------------+-----------------------------
 Reporter:  antonvlasenko  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  REST API       |    Version:  trunk
 Severity:  minor          |   Keywords:
  Focuses:  rest-api       |
---------------------------+-----------------------------
 The `WP_REST_Templates_Controller::get_wp_templates_author_text_field()`
 method sometimes fails to return a value. Its `@return` type is specified
 as a `string`, so it should consistently return a `string`.

 Possible solutions include returning an empty string or throwing an
 exception if the `$original_source` does not equal one of the expected
 values.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61580>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list