[wp-trac] [WordPress Trac] #49209: Site health issue due to issues in processing wp_remote_retrieve_body

WordPress Trac noreply at wordpress.org
Thu Jan 16 17:12:35 UTC 2020


#49209: Site health issue due to issues in processing wp_remote_retrieve_body
--------------------------+-------------------------
 Reporter:  aparnascodex  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Site Health   |     Version:
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:
--------------------------+-------------------------

Comment (by pwatras):

 Replying to [comment:1 aparnascodex]:
 > I was able to trace the issue. This was due to space before <?php tag in
 one of the plugin file
 I was initially going to suggest that changing the condition from {{{
 'yes' !== $response }}} to {{{ 'yes' !== trim($response) }}} does not seem
 like a good idea because instead of trimming/processing the $response
 content, the original problem should be solved - that is the remote
 service should return a proper response. While additional space is not a
 problem in itself, it could be an indicator that something wrong is going
 on. This way, by forcing the response to be strictly correct, you push the
 developer for finding the root cause of the problem.

 And all this indeed happened. The problem was elsewhere and you
 successfully located the root cause.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49209#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list