Title: QM shows 1 PHP warning and 2 HTTP API call problems while using WP_HTTP_BLOCK_EX
Last modified: June 1, 2019

---

# QM shows 1 PHP warning and 2 HTTP API call problems while using WP_HTTP_BLOCK_EX

 *  Resolved [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/)
 * I disabled the external HTTP calls inside my local development enviroment with`
   define('WP_HTTP_BLOCK_EXTERNAL', true);` inside the `wp-config.php` file.
 * Now the Query Monitor shows one PHP warning and two HTTP API call problems inside
   the admin panel of WordPress.
 * The requested URLs are:
    [http://api.wordpress.org/core/version-check/1.7/?version=4.9.10&php=7.3.5&locale=de_DE&mysql=5.5.5&local_package=de_DE&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590](http://api.wordpress.org/core/version-check/1.7/?version=4.9.10&php=7.3.5&locale=de_DE&mysql=5.5.5&local_package=de_DE&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590)
   [https://api.wordpress.org/core/version-check/1.7/?version=4.9.10&php=7.3.5&locale=de_DE&mysql=5.5.5&local_package=de_DE&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590](https://api.wordpress.org/core/version-check/1.7/?version=4.9.10&php=7.3.5&locale=de_DE&mysql=5.5.5&local_package=de_DE&blogs=1&users=1&multisite_enabled=0&initial_db_version=38590)
 * And the PHP Error is located in `wp-includes/update.php:155`
 * How can I hide this warning/problems?
 * Or is this a problem of WordPress? Or the Query Monitor?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11595018)
 * Thanks for the report.
 * Unfortunately there are a few places in the HTTP API in WordPress which don’t
   provide actions or filters for QM to hook into. One of these is the return value
   on the `WP_Http::request()` method when it returns an error due to, among other
   things, the `WP_HTTP_BLOCK_EXTERNAL` constant being in use.
 * In this situation, QM has to assume that the request timed out because it can’t
   access the actual error message.
 * I’m going to open a WordPress core bug report to get the required actions or 
   filters added to that class so QM can correctly report the error message.
 * On my local development environments I’m a big fan of using [Airplane Mode](https://github.com/norcross/airplane-mode)
   to block external HTTP requests and external assets. Give it a try, it might 
   work better than using the `WP_HTTP_BLOCK_EXTERNAL` constant.
    -  This reply was modified 7 years ago by [John Blackbourn](https://wordpress.org/support/users/johnbillion/).
 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11595060)
 * Oh! It turns out I already reported this bug six years ago haha. [https://core.trac.wordpress.org/ticket/25747](https://core.trac.wordpress.org/ticket/25747)
 * I’ll see if I can get it moving.
 *  Thread Starter [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11595428)
 * I aggree with you: It was a mistake to bother you with this issue. WP has to 
   fix it.
 * Sorry!
 *  Thread Starter [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11626070)
 * I have an idea, how you could serve me and improve the QM:
 * Implement a feature to hide errors, warnings and hint.
 * Like mentioned before in this topic, I get always a special problem inside the
   admin panel. QM shows me located here:
    wp-includes/update.php:155
 * Like mentioned before by you, this is a problem of WordPress, which you still
   reported several years before. So there is not a lot of hope to, that it will
   be fixed soon.
 * But you could let me accept and hide this error and not show it to me again later
   on.
 * Right now, I have a second problem: A warning about “compact(): Undefined variable:
   groupby” in wp-includes/class-wp-comment-query.php:853. Without analyzing this
   problem further more, I believe it could be a problem of WordPress too. (But 
   maybe it based on a problem from me, I know. 😉 )
 * So if I could mark that problem as accepted, I would not longer see the QM area
   inside the admin bar highlighted. So I would detect new problems better, since
   right now, I have to search from them. They are not show to me otherwise.
 * … just my idea, I wanted to share with you…
    -  This reply was modified 7 years ago by [tahtu](https://wordpress.org/support/users/tahtu/).
 *  Thread Starter [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11626133)
 * … ah, I found the reason, why WordPress shows the update problem warning to me:
 *  function nw_pre_site_transient_update_core() {
    return NULL; } add_filter(‘pre_site_transient_update_core’,‘
   nw_pre_site_transient_update_core’);
 * … the result must be `false` instead of `null`.
 * So right now, I don’t see the QM area inside the admin bar highlighted further
   more.
 * But the idea with accepting and hiding problems is still not bad, I believe. 
   Maybe other developer have problems…
 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11628403)
 * You can already hide errors from plugins and themes that you choose. Instructions
   here: [https://querymonitor.com/blog/2018/07/silencing-errors-from-plugins-and-themes/](https://querymonitor.com/blog/2018/07/silencing-errors-from-plugins-and-themes/)
 * QM should be automatically hiding the “An unexpected error occurred” warning 
   that WordPress core generates, it seems like it’s not doing it at the moment 
   so I’ll get that fixed.
 *  Thread Starter [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11629073)
 * You have a lot of great knowledge. But it’s not easy to me to find them by myself.
   Maybe you could think about, how you could offer this knowledge more easily to
   people like me? …
 * Thank’s alot for this filter!
 *  Thread Starter [tahtu](https://wordpress.org/support/users/tahtu/)
 * (@tahtu)
 * [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11631963)
 * Right now, I tried to implement the hiding solution for the problems. While doing
   this, I missed a feature to hide special bugs of the WordPress core. Exactly 
   still a problem in “wp-includes/update.php:155”.
 * Am I right, there is no filter which I can use to hide this bug only?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘QM shows 1 PHP warning and 2 HTTP API call problems while using WP_HTTP_BLOCK_EX’
is closed to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [tahtu](https://wordpress.org/support/users/tahtu/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/qm-shows-1-php-warning-and-2-http-api-call-problems-while-using-wp_http_block_ex/#post-11631963)
 * Status: resolved