Oh, just for the record, adding only that isset before the original code seems to work as well:
&& isset($_SERVER['REQUEST_METHOD']) && strcasecmp($_SERVER['REQUEST_METHOD'], 'GET') == 0 && !is_admin()
I don’t see any changes in the code it’s the same as the code I’ve shipped to you in the latest build of the plugin.
Where have you been looking @isaumya ? The last comment by Ingo refers to line 567 in wp-cloudflare-super-page-cache.php. The plugin as it ships at the moment (downloaded via https://downloads.wp.xz.cn/plugin/wp-cloudflare-page-cache.zip )does a string case compare there, this seems to fail with php 8+:
strcasecmp($_SERVER['REQUEST_METHOD'], 'GET') == 0 && !is_admin()
While the code that Ingo posted does an isset, and then compares the strings with ==, this seems to work:
isset($_SERVER['REQUEST_METHOD']) && $_SERVER["REQUEST_METHOD"] == 'GET' && !is_admin()
Please take a look at https://ww.wp.xz.cn/support/topic/php-warning-undefined-array-key-request_method/ as well as Ingo initially suggested.
Cheers.