Hi,
When you go to /user/*/edit check the delete image button, then add a new image and hit save you get:

Warning: strtr() [function.strtr]: The second argument is not an array in syslog_watchdog() (line 105 of /www/htdocs/modules/syslog/syslog.module).

Then when you go to /admin/reports/dblog, it falls over

Recoverable fatal error: Argument 2 passed to t() must be an array, string given, called in /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/modules/dblog/dblog.admin.inc on line 265 and defined in t() (line 1458 of /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/includes/bootstrap.inc).

Comments

stephenrobinson’s picture

When I debug syslog_watchdog

  if(!is_array($log_entry['variables'])){
    drupal_set_message('<pre>'.htmlspecialchars(print_r($log_entry['variables'],1)).'</pre>');
  }

I get:

image/jpeg</pre>

Which is a string, not an array.

stephenrobinson’s picture

    [type] => file_get_mimetype
    [message] => wrapper getMimeType<pre>
    [variables] => image/jpeg</pre>
    [severity] => 5
    [link] => 
    [user] => stdClass Object
    ....
stephenrobinson’s picture

back traced to
watchdog(file_get_mimetype, wrapper getMimeType<pre>, image/jpeg</pre>) called at [/www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/includes/file.inc:2108]

stephenrobinson’s picture

Component: user.module » file.module
stephenrobinson’s picture

Joining strings with a dot works better than a comma...

 watchdog('file_get_mimetype', 'wrapper getMimeType<pre>', htmlspecialchars(print_r(DrupalLocalStreamWrapper::getMimeType($uri, $mapping),1)).'</pre>');

==>

 watchdog('file_get_mimetype', 'wrapper getMimeType<pre>'. htmlspecialchars(print_r(DrupalLocalStreamWrapper::getMimeType($uri, $mapping),1)).'</pre>');
xjm’s picture

Version: 7.10 » 8.x-dev
Priority: Critical » Normal

Generally this error is caused by a contrib module passing bad data to watchdog(). Testing to see if I can reproduce the error here.

xjm’s picture

Status: Active » Postponed (maintainer needs more info)

So, I am unable to reproduce this image using just Drupal core. Steps I used:

  1. Install Drupal core, standard profile.
  2. Go to admin/people and add a user. Save.
  3. Go to user/5/edit and add a user picture. Save.
  4. Go to user/5/edit.
  5. Check the delete box.
  6. Upload a new image.
  7. Click save.

No error is triggered.

So, we need more specific steps to reproduce. My guess it is being caused by a contrib module, so I'd suggest trying to determine which and moving this issue to that module's queue.

stephenrobinson’s picture

are you using 7.10, using a comma to join strings is a clear error, unless you have your warnings supressed and havnt checked your log.
The error is a typo in /includes/file.inc.
Parameter 3 must be an array anyway...

jhedstrom’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing this out. It's been postponed at 'maintainer needs more info' for 4 years. Please re-open if this is still an issue.