I was having difficulty with my 404 page not showing. Instead I was getting a generic "Error /n The website encountered an unexpected error. Please try again later." I turned on all error reporting and discovered the following error:
"Recoverable fatal error: Argument 2 passed to t() must be an array, null given, called" <path to emaillog.module>
When I disable the emaillog module, 404 works as expected.
line 110 is this: '@message' => strip_tags(t($log_msg['message'], $log_msg['variables'])),
When I change the second argument of this line to:
line 110 is this: '@message' => strip_tags(t($log_msg['message'], $log_msg)),
I now get:
Warning: htmlspecialchars() expects parameter 1 to be string, object given in check_plain() (line 1521 of /html/includes/bootstrap.inc).
My work-around
- Changing $log_msg['variables'] to $log_msg
- Disabling all warning messages under admin/config/development/logging (as it should be for live)
- Disable logging_alert warn message, since I now get this alert every time
Allows the 404 redirection to happen. Watchdog updates as well, though I suspect not a "proper" log entry
Comments
Comment #1
maciej.zgadzaj commentedFixed in 7.x-2.x.