I have the following plugin for hook: mail_send (line 261 in class_mail.php).
PHP Code:
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. Thanks!