Title: PHP Warning: Undefined array key &#8220;REQUEST_METHOD&#8221;
Last modified: May 1, 2026

---

# PHP Warning: Undefined array key “REQUEST_METHOD”

 *  [Weißbeck](https://wordpress.org/support/users/hugomaulwurf/)
 * (@hugomaulwurf)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-3/)
 *     ```wp-block-code
       Hi,I'm getting the following PHP Warning in my error log:PHP Warning: Undefined array key "REQUEST_METHOD" in .../ninjafirewall/lib/class-firewall-log.php on line 143Environment:- WordPress Version: 6.9.4- NinjaFirewall Version: 4.8.5  - PHP Version: 8.4.20- Server: NginxEverything seems to work fine but the warning spam the error log.Is there a fix or workaround available?Thanks!
       ```
   
    -  This topic was modified 1 month, 1 week ago by [Weißbeck](https://wordpress.org/support/users/hugomaulwurf/).

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [bruandet](https://wordpress.org/support/users/bruandet/)
 * (@bruandet)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-3/#post-18897074)
 * That request seems to come from a command line tool (PHP CLI) not from an HTTP
   request, because the `$_SERVER['REQUEST_METHOD']` environment variable is missing.
   
   Do you have any idea who/what triggers that request ?

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-undefined-array-key-request_method-3%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

## Tags

 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 1 reply
 * 2 participants
 * Last reply from: [bruandet](https://wordpress.org/support/users/bruandet/)
 * Last activity: [1 month, 1 week ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-3/#post-18897074)
 * Status: not a support question