Title: PHP Warning: Undefined array key &#8220;REQUEST_METHOD&#8221;
Last modified: April 24, 2023

---

# PHP Warning: Undefined array key “REQUEST_METHOD”

 *  [catuyen](https://wordpress.org/support/users/catuyen/)
 * (@catuyen)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-2/)
 * Hi,
 * I disabled wp-cron in the wp-config.php file and when running the cron command,
   the output gets an error like below in PHP 8.2. Could you please check and maybe
   help to improve it?
 * `PHP Warning: Undefined array key "REQUEST_METHOD" in /home/example/htdocs/www.
   example.net/wp-content/plugins/flying-scripts/html-rewrite.php on line 18`
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [catuyen](https://wordpress.org/support/users/catuyen/)
 * (@catuyen)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-2/#post-16768701)
 * Change line 18 in the file html-rewrite.php to
 *     ```wp-block-code
       if(isset($_SERVER['REQUEST_METHOD']) &&	($_SERVER['REQUEST_METHOD'] !== 'GET') {
       ```
   
 * Reference: [PHP Warning: Undefined array key “REQUEST_METHOD” | WordPress.org](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method/)
 * Could anyone understand the code please help me confirm this solution?
    -  This reply was modified 2 years, 10 months ago by [catuyen](https://wordpress.org/support/users/catuyen/).
    -  This reply was modified 2 years, 10 months ago by [catuyen](https://wordpress.org/support/users/catuyen/).
    -  This reply was modified 2 years, 10 months ago by [catuyen](https://wordpress.org/support/users/catuyen/).

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: Undefined array key “REQUEST_METHOD”’ is closed to new replies.

 * ![](https://ps.w.org/flying-scripts/assets/icon-256x256.png?rev=2240444)
 * [Flying Scripts: Delay JavaScript to Improve Site Speed & Performance](https://wordpress.org/plugins/flying-scripts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flying-scripts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flying-scripts/)
 * [Active Topics](https://wordpress.org/support/plugin/flying-scripts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flying-scripts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flying-scripts/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [catuyen](https://wordpress.org/support/users/catuyen/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-request_method-2/#post-16768701)
 * Status: not resolved