You are here

private function MediaReadOnlyStreamWrapper::_report_error in D7 Media 7

Same name and namespace in other branches
  1. 7.4 includes/MediaReadOnlyStreamWrapper.inc \MediaReadOnlyStreamWrapper::_report_error()
  2. 7.2 includes/MediaReadOnlyStreamWrapper.inc \MediaReadOnlyStreamWrapper::_report_error()
  3. 7.3 includes/MediaReadOnlyStreamWrapper.inc \MediaReadOnlyStreamWrapper::_report_error()

Report an error.

Parameters

$message: The untranslated string to report. @param $options An optional array of options to send to t(). @param $display If TRUE, then we display the error to the user. @return We return FALSE, since we sometimes pass that back from the reporting function.

1 call to MediaReadOnlyStreamWrapper::_report_error()
MediaReadOnlyStreamWrapper::stream_open in includes/MediaReadOnlyStreamWrapper.inc
Support for fopen(), file_get_contents(), file_put_contents() etc.

File

includes/MediaReadOnlyStreamWrapper.inc, line 149

Class

MediaReadOnlyStreamWrapper
A base class for Resource Stream Wrappers.

Code

private function _report_error($message, $options = array(), $display = FALSE) {
  watchdog('resource', $message, $options, WATCHDOG_ERROR);
  if ($display) {
    drupal_set_message(t($message, $options), 'error');
  }
  return FALSE;
}