Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaration of getID3_cached_sqlite3 #49

Closed
webkader opened this issue Aug 14, 2015 · 6 comments
Closed

Declaration of getID3_cached_sqlite3 #49

webkader opened this issue Aug 14, 2015 · 6 comments

Comments

@webkader
Copy link

hi, how do i fix this bug?

Declaration of getID3_cached_sqlite3::analyze() should be compatible with getID3::analyze($filename, $filesize = NULL, $original_filename = '') in extension.cache.sqlite3.php on line 265

i think here is the cause

public function analyze($filename) {
...
$analysis = parent::analyze($filename);
...
}

@JamesHeinrich
Copy link
Owner

Fixed in d5c2918

Mirroring the similar fix (1e1f1a0) in the MySQL cache extension, I have modified the parent::analyze call

@webkader
Copy link
Author

thanks, next issue

SQLite3Stmt::execute(): Unable to execute statement: NOT NULL constraint failed: media_cache.filesize in extension.cache.sqlite3.php on line 195

@JamesHeinrich JamesHeinrich reopened this Aug 14, 2015
@JamesHeinrich
Copy link
Owner

I am not at all familiar with SQLite, perhaps someone who is can comment and recommend a fix.

@webkader
Copy link
Author

Fixed

Solution this line

return "CREATE TABLE IF NOT EXISTS $this->table (filename VARCHAR(255) NOT NULL DEFAULT '', dirname VARCHAR(255) NOT NULL DEFAULT '', filesize INT(11) NOT NULL DEFAULT '0', filetime INT(11) NOT NULL DEFAULT '0', analyzetime INT(11) NOT NULL DEFAULT '0', val text not null, PRIMARY KEY (filename, filesize, filetime))";

to

return "CREATE TABLE IF NOT EXISTS $this->table (filename VARCHAR(255) DEFAULT '', dirname VARCHAR(255) DEFAULT '', filesize INT(11) DEFAULT '0', filetime INT(11) DEFAULT '0', analyzetime INT(11) DEFAULT '0', val text, PRIMARY KEY (filename, filesize, filetime))";

@webkader
Copy link
Author

sqlite allow the use of null entries in a primary key column. least one column of the primary key to be not null

@JamesHeinrich
Copy link
Owner

Taking your word for it, updated in de973d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants