- 🇮🇹Italy apaderno Brescia, 🇮🇹
- $directory_path = file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath(); + $wrapper = file_stream_wrapper_get_instance_by_scheme('public'); + $directory_path = ($wrapper instanceof MediaReadOnlyStreamWrapper) + ? $wrapper->getDirectoryPath() + : 'sites/default/files'; + $items[$directory_path . '/styles/%image_style'] = array(
Drupal 7 does not define any
MediaReadOnlyStreamWrapper
class. If that is a class defined from a contributed module, it is the contributed module that needs to fix its own code. Drupal code cannot depend on classes defined from contributed modules.