Drupal Core 7.22
Linux/MySQL Hosting
Module installed and working for about a month. Since D7 doesn't give a cron output of cron errors I went to run cron manually from cron page in drupal configuration and noticed this error:
Fatal error: Call to undefined function dsm() in /home/content/63/10229663/html/sites/all/modules/ed_classified/modules/classified_notifications/classified_notifications.module on line 188
Here is the offending line of code:
182 /**
183 * Callback for cron to send queues mail jobs.
184 *
185 * @param array $job
186 */
187 function classified_notifications_deliver($job) {
188 dsm($job, __FUNCTION__);
189 drupal_mail_system('classified_notifications', $job['key'])->mail($job['message']);
190 }
The problem seems to have occurred at ad half-life (the first notification to send) as my ads are set to run for 60 days. I did not see any way to disable notifications so, I tried commenting it out as a temp work around but that just got me: Fatal error: Call to undefined function classified_notifications_deliver() in /home/content/63/10229663/html/includes/common.inc on line 5273
I deleted the ad that was past half-life, but the error remains when cron runs.
Also I am not very good at php, but aren't "magic constants" like '__FUNCTION__' used for debugging? Could this be causing the fatal error? Pardon my ignorance, but maybe you could explain.
Any help appreciated.
FRANK
Comments
Comment #1
fgmHello. Thanks for your report, this was a known bug in 7.x-3.0.
The bug is because dsm() is not supposed to be present in production code, it is a function from devel.module. Just remove that line or upgrade to the 7.x-1.x-dev version, where this is fixed.
Magic constants are not specifically related to development/debugging, Drupal uses them quite a lot, btw.
Comment #2
fdg123 commentedfgm,
Thanks, removing line 188 worked like a charm.
Also, thanks for the info on magic constants.
Happy Drupaling,
FRANK :)