Log in

View Full Version : Quick question re: hook mail_send


Antivirus
04-27-2007, 12:36 PM
I have the following plugin for hook: mail_send (line 261 in class_mail.php).


global $db;

$buser = $db->query_first("
SELECT * FROM " . TABLE_PREFIX . "user
WHERE email LIKE '%" . $vbulletin->db->escape_string_like($toemail) . "%'
");


The plugin works fine EXCEPT for when i MANUALLY run a scheduled task which uses the class_mail.php script (such as Birthdays scheduled task). The scheduled task log shows that the task runs fine on it's own, but if i run the task manually, i get the following error:

Birthdays

PHP Fatal error: Call to a member function query_first() on a non-object in D:\webppliance\conf\domains\eclipse\Inetpub\wwwroo t\forum\includes\class_mail.php(261) : eval()'d code on line 4

Now i see that for some reason, it doesn't recognize the query_first function when running the task manually, but why then would it recognize the function when running the task automatically? And what do i need to incllude in order to resolve this issue? I'm totally stumped, please if anyone can tell me why?

BTW, i'm running version 3.6.5 and this is for my Ezbounce Management hack (https://vborg.vbsupport.ru/showthread.php?t=138884). Thanks!

Antivirus
05-05-2007, 08:32 PM
(bump) :o