Closed (fixed)
Project:
getID3()
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2008 at 04:41 UTC
Updated:
21 Nov 2024 at 10:21 UTC
Jump to comment: Most recent
I have a need to upload some files that are not in a file format supported by getid3, unfortunately getid3 spits out an ugly error to the user because an exception is thrown when the file is analyzed.
This really should be caught by the module and better handled in drupal, for my application if there is no id3 information then these fields should be able to be left blank.
I have marked this issue under version 5.x.1.1 as that is what I am using but I just checked the 6.x code and it noticed this isn't handled there as well.
The simple fix I have come up with is shown below
/**
* Analyze file and return its media information.
*/
function &getid3_analyze($path) {
$info = array();
if($id3 = &getid3_instance()) {
try {
$info = $id3-> analyze($path);
} catch (getid3_exception $e) {
// you could do something here with the error, maybe saved in drupal's error log
}
unset($id3);
}
return $info;
}
Comments
Comment #1
drewish commentedif this is a problem in 6.x we need to fix it there and then back port a fix.
Comment #2
astonvictor commentedI'm closing it because the issue was created a long time ago without any further steps.
if you still need it then raise a new one.
thanks
Comment #3
astonvictor commented