I was refractoring the code for my module certification and i came across to the part of documentation where it says:
Do not use global variables like:
$_POST
$_GET
$_SERVER
// etc.
And this is my code which i want to refactor:
if ($_FILES) {
$filename = $_FILES["orderpdf"]["name"];
$tmpfname = $_FILES["orderpdf"]["tmp_name"];
$pdfData = $this->uploadAndReturnEncodedContent($filename, $tmpfname);
}
I know i can use:
$oConfig = Registry::getConfig()->getUploadedFile("orderpdf")
to get files content such as name, But what is the alternate of the IF statement block?
if (what_is_the_alternate_of_$_FILES) {
}
Using OXID version CE 6.1.4