Check the existence of superglobals $_POST['post_ID'] and $_POST['checked']
waviaei opened this issue · 1 comments
waviaei commented
We tried to use the plugin, but was request to fix below three superglobal array issues.
Note: the review was done when Public Post Preview was v2.9.1, so the lines 388, 404, and 406 in below report are now 394, 410 and 412 respectively.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
388 | ERROR | Detected usage of a possibly undefined superglobal array index: $_POST['post_ID']. Use isset() or empty() to check the index exists before using it
404 | ERROR | Detected usage of a possibly undefined superglobal array index: $_POST['checked']. Use isset() or empty() to check the index exists before using it
406 | ERROR | Detected usage of a possibly undefined superglobal array index: $_POST['checked']. Use isset() or empty() to check the index exists before using it
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
I will send the PR, which was worked from v2.9.2.