Skip to content
Snippets Groups Projects
Commit ecd2d4d4 authored by Radu Rotari's avatar Radu Rotari Committed by Yaroslav Lushnikov
Browse files

Issue #3154892 by rrotari: Query condition '%s %s ()' cannot be empty

parent aef7a498
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ function svg_image_field_formatter_info_alter(array &$info) {
* @see template_preprocess_image_style()
*/
function svg_image_preprocess_image_style(array &$variables) {
if (isset($variables['image']['#access']) && !$variables['image']['#access']) {
if (isset($variables['image']['#access']) && !$variables['image']['#access'] && !empty($variables['image']['#uri'])) {
$files = \Drupal::entityTypeManager()->getStorage('file')
->loadByProperties(['uri' => $variables['uri']]);
if ($files) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment