If FFmpeg wrapper is part of an install profile, when installing the site at install.php it causes a Fatal error: Call to undefined function db_result() in includes/path.inc on line 55

This is because FFMPEG wrapper calls the url() function in its hook_requirements(), but url() requires database access and throws a fatal error if called before the site is installed.

Comments

arthurf’s picture

I'm not able to duplicate this with either the 6.1.x or 6.2.x branches- the l() works fine for me in .install files. Can you provide the specific error message you're getting?

mfb’s picture

See above for specific error message: Fatal error: Call to undefined function db_result() in includes/path.inc on line 55
l() calls url() which calls drupal_get_path_alias() which calls drupal_lookup_path() which calls db_result() but at install.php the database is not setup yet.

arthurf’s picture

Ok, I see that you're referencing install.php which is *not* where I've been testing. So that explains why I can't duplicate it. Silly that l() is supported in system_modules_submit() but not in an install profile.

So I don't want to remove the link but I would obviously like to support install profiles. So perhaps the fix is to make an assumption about the base url using $_SERVER when function_exists('url') is false?

mfb’s picture

In this patch i removed the link on install.php (if user clicked on the link here they'd just get an error message because the site isn't installed yet) and also fixed t() to use get_t() which is needed on install.php for the same reason -- database not available yet.

mfb’s picture

StatusFileSize
new2.38 KB

weird, the patch was attached in the last comment.. :/