[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
Mon Jul 8 19:28:25 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          |  Resolution:
 Keywords:                 |     Focuses:  rest-api
---------------------------+------------------------------

Comment (by debarghyabanerjee):

 Replying to [ticket:61580 antonvlasenko]:
 > 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#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list