Closed (fixed)
Project:
e-Commerce
Version:
5.x-4.x-dev
Component:
ec_mail
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2008 at 11:29 UTC
Updated:
9 May 2008 at 12:41 UTC
During a 'typical install' I selected the modules I wanted and hit submit. I was then told that I'd not selcted some dependencies... So I clicked proceed to have them enabled for me... I then got a White-Screen-O-Death...
I checked my error logs and found this:
2008-04-25 12:13:02: (mod_fastcgi.c.2592) FastCGI-stderr: PHP Fatal error: Call to undefined function store_mail_types() in /var/www/html/www.4hd.net/drupal/sites/www.4hd.net/modules/ecommerce/ec_mail/ec_mail.module on line 458
So I jumped onto that line and its referring to this section of code...
foreach ($modules as $module) {
$function = $module .'_mail_types';
foreach (array_keys($function()) as $type) {
if (in_array($type, $types) or !count($types)) {
$imps[$type] = $module;
}
}
}
So this function looks for hooks and then tries to run them, simply assuming they exist... So I changed it to:
foreach ($modules as $module) {
$function = $module .'_mail_types';
if (function_exists($function)) {
foreach (array_keys($function()) as $type) {
if (in_array($type, $types) or !count($types)) {
$imps[$type] = $module;
}
}
}
}
The issue has now disappeared. So the 'patch' in this case is simple to wrap the foreach in a condition that the function exists... I kinda figured there was little point creating a patch file for this as it'd be just as easy to apply yourself :-)
Nick
Comments
Comment #1
nicholasthompsonJust noticed this as a duplicate (didn't see the issue when I first searched...)
Original issue: #237494: [ec5.x-4.x-dev] Call to undefined function store_mail_types() in ec_mail.module on line 458
Comment #2
nicholasthompsonSorry - forgot to reset the status
Comment #3
gordon commentedThe store_mail_types() had been moved from the store.module to store.manage.inc
I have included this in the installation so it doesn't fail.
See http://drupal.org/cvs?commit=112872
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.