Problem/Motivation
In multiple places, watchdog()
is called with incorrect arguments. In one case this is generating a fatal error when the resulting watchdog message is displayed:
Recoverable fatal error: Argument 2 passed to t() must be of the type array, string given, called in /path/to/site/code/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1755 of /path/to/site/code/includes/bootstrap.inc).
This error comes from the line:
watchdog('sendgrid_integration', t('No API Secret key has been set'), 'warning');
The 'warning' should be the third and not the second argument.
Other faulty watchdog entries include:
- Ones in this form:
watchdog('SendGrid Integration', 'Error on calling get_bounches: Missing date parameter', NULL, WATCHDOG_NOTICE, $link = NULL);
Final
, $link = NULL
should be deleted. - Ones in this form:
watchdog('sendgrid_integration_reports', t('Sendgrid Module is not setup with API key.'), array(), 'WATCHDOG_NOTICE', NULL);
t()
should not be called on the second argument.
The constantWATCHDOG_NOTICE
should not be in quotes.
Comments
Comment #2
nedjoComment #4
Perignon CreditAttribution: Perignon commentedFixed! Thanks for pointing out the inconsistencies.