I'm trying to get an error to return when I search the temporary file that is uploaded.
`
$getID3 = new getID3;
$file = $getID3->analyze($_FILES["file"]["tmp_name"]);
//print_r($file);
if (isset($file['error'])) {
echo $file['error'];
} else {
echo "
<b>Duration:</b> " . $file['playtime_string'] . "<br/>
<b>Dimensions:</b> " . $file['video']['resolution_x'] . "x" . $file['video']['resolution_y'] . "<br/>
<b>Filesize:</b> " . $file['filesize'] . "bytes";
}
`
And it exists in the array because when I upload an invalid file type it returns this array.
Array
(
[GETID3_VERSION] => 1.9.12-201602240818
[filesize] => 159924
[filepath] => /tmp
[filename] => phpQAJeuD
[filenamepath] => /tmp/phpQAJeuD
[encoding] => UTF-8
[error] => Array
(
[0] => unable to determine file format
)
)
How is it not getting ['error']
?