I select an MP3 file with the Ckeditor_SWF module in place and get some strange errors from getid3. They remind me of php5.3 errors. Runing latest getid3 1.9.1 and 6.1.x.dev of this module

No idea whos error this is, getid3, this modules or the CKEditor_SWF integration. Any way to test Getid3?

The [...] below are me knocking out my site path info

[code]
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.id3v2.php on line 55.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.id3v2.php on line 56.
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.id3v1.php on line 28.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.id3v1.php on line 29.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.id3v1.php on line 30.
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.apetag.php on line 35.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.apetag.php on line 36.
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.lyrics3.php on line 30.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.tag.lyrics3.php on line 31.
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/getid3.php on line 412.
•warning: fread() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/getid3.php on line 413.
•warning: fseek() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/module.audio.mp3.php on line 1358.
•warning: fclose() expects parameter 1 to be resource, null given in [...]sites/all/libraries/getid3/getid3/getid3.php on line 488.
[/code]

Comments

allan1015’s picture

I put in some debug statesments onm the first error above - module.tag.id3v2.php on line 55.

$this->getid3->filename is a good filename
$this->getid3->fp is null and hence the error

Where does the file get opened?

allan1015’s picture

So the issue is the filename, if it has spaces or parans they are input as urlencoded space = %20
Checks like is_readable and is_file pass fine

In getid3.php in the openfile function I added a urldecode call on the filename, things are now working

Now I've no idea if this error in in the calling CKEditor_SQL module, if it should urldecode before passing the filename?
Does GetID3 expect decoded filenames?

This urldecode line is what I added.

	function openfile($filename) {

		$filename = urldecode($filename);

		try {

However, this all seems to start with the function analyze() which calls openfile
The analyze function is called by CKEditor_SWF
I can patch over with a decode befroe calling analyze and all is well

So advice on where to patch?