Project

General

Profile

« Previous | Next » 

Revision 62b804e6

Added by Andreas Kohlbecker about 5 years ago

ref #8056 allowing faltal errors to show up from imagecreatefromstring()

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.media.theme
39 39
    return FALSE;
40 40
  }
41 41

  
42
  $im = @ImageCreateFromString($contents); // Using @ to avoid php warnings.
42
  $last_level = error_reporting (E_ERROR); // suppress warnings from the imagecreatefromstring() method,
43
  $im = imagecreatefromstring($contents);
44
  error_reporting($last_level); // reset the error_reporting level
45

  
43 46
  if (!$im) {
44 47
    return FALSE;
45 48
  }

Also available in: Unified diff