I am getting the above error when trying to run the following lines of script:
$fileInfo = new SplFileInfo($subfile);
if ($fileInfo->getExtension() == 'brd') {
$debug->alert_code_info($fileInfo);
$filesize = $fileInfo->getSize();
functionName($subfile, 'application/octet-stream', $filesize);
}
The getExtension function works, as I'm able to proceed to the code within the if block. So why is getExtension() working while getSize() isn't?