One less superglobal rewritten

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #693 from emanuele45/write_sg

One less superglobal rewritten