I was getting this error in cron:

Fatal error: Function name must be a string in /sites/all/modules/subscriptions/subscriptions_mail.module on line 121

I tracked it down and realized that for whatever reason $mailvars_function wasn't getting a value and there was no catch for it or default value. I didn't spend a lot of time figuring out how to reproduce this issue or digging deeper to figure out why that variable wasn't available, but all the basic checks were done and made sure all the settings were saved, etc. So, through the docs i found a value that should work (hopefully its a reasonable default) and made this fix.

          $mailvars_function = $fields[$locale][$module][$field]['mailvars_function'];
          watchdog('debug', '#1: $mailvars_function is '. (isset( $mailvars_function ) ? 'set' : 'null'));
          if( is_null($mailvars_function) ) {
            $mailvars_function = '_subscriptions_content_node_mailvars';
          }

Interested to find out more about to find out more about this, but it was a last minute bug that was discovered after going live with a site so will post back if there is additional bad behaviour or info.

Comments

salvis’s picture

5.x-2.5? That has been running productively on many sites for a long time now. It would be very surprising if this was caused by any of the modules in the Subscriptions package. Are you using any additional Subscriptions add-ins that haven't implemented the proper hooks?

rcross’s picture

not that i know of... i upgraded to 2.x-dev and the problem seemed to resolve it self (without my additional fix)

salvis’s picture

Category: task » support

The only change between 5.x-2.5 and 5.x-2.x-dev is #735092: D5: No 'new' notifications when unpublished node gets published, which seems unrelated to the behavior that you observed.

I suspect that your copy of 5.x-2.5 was somehow modified, maybe in an attempt to customize something.

salvis’s picture

Status: Active » Closed (cannot reproduce)

Obsolete anyway.