• Normally the superglobal $_POST is empty on a GET request.

    I’ve seen several plugins that programmatically populate the superglobal $_POST.
    This means, when such plugin is active, on any GET request the superglobal $_POST is NOT empty.

    Can this be considered as a bad coding practice ?

    • This topic was modified 5 years, 4 months ago by nlpro.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Depends on what they’re doing and why they are doing it, but generally speaking, yes, that’s not a great idea.

    Thread Starter nlpro

    (@nlpro)

    Hi Otto,

    Appreciate your fast response;-)

    One of those (ww.wp.xz.cn) plugins is: WordPress Hosting Benchmarking Tool

    It’s a small plugin, so figuring out “what they’re doing and why they are doing it” is probably a simple excercise for a seasoned WordPress moderator like you.

    I’ve already had a look at their code. So no worries, you can go all tech on me 😉

    Genuinely interested in your opinion.

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

The topic ‘plugins programmatically populating $_POST in GET request’ is closed to new replies.