Closed (fixed)
Project:
Context Ad Serving and Analytics
Version:
6.x-1.11-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Mar 2010 at 21:55 UTC
Updated:
16 Apr 2010 at 20:40 UTC
The apt_plugin fails with this PHP error if the profile module isn't enabled:
PHP Fatal error: Call to undefined function profile_load_profile() in /var/www/html/drupal-6.12/sites/all/modules/casaa/plugins/apt_plugin/apt_plugin.module on line 315
By adding a call to module_exists in apt_plugin.module you can handle this error gracefully. Here is a patch:
--- /home/bakomatic/casaa/plugins/apt_plugin/apt_plugin.module 2010-02-26 15:29:49.000000000 -0600
+++ casaa/plugins/apt_plugin/apt_plugin.module 2010-03-31 15:55:43.000000000 -0500
@@ -311,7 +311,7 @@ function apt_plugin_output($script_value
$output .= 'yld_mgr.request_type="ac";' . "\n";
$output .= 'yld_mgr.container_type="js";' . "\n";
- if ($user->uid != '') {
+ if ($user->uid != '' && module_exists('profile')) {
profile_load_profile($user);
if ($user->profile_gender == 'M') {
$output .= 'yld_mgr.user_gender = "male";' . "\n";
Comments
Comment #1
cntlscrut commentedThanks!
Comment #2
cntlscrut commentedfix has been applied to the module and is available as of v. 6.x-1.12-rc1