Commit 46e6da95 authored by Marina Victória's avatar Marina Victória Committed by renatog
Browse files

Issue #3272796 by victoria-marina, bart lambert, apaderno, muranod, Ruturaj...

Issue #3272796 by victoria-marina, bart lambert, apaderno, muranod, Ruturaj Chaubey: Passing null to parameter #1 ($haystack) of type string to strpos() is deprecated
parent 7371a57b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ function template_preprocess_colorbox_formatter(&$variables) {
  // Shorten the caption for the example styles or when caption
  // shortening is active.
  $config = \Drupal::config('colorbox.settings');
  $colorbox_style = $config->get('colorbox_style');
  $colorbox_style = !empty($config->get('colorbox_style')) ? $config->get('colorbox_style') : '';
  $trim_length = $config->get('colorbox_caption_trim_length');
  if (((strpos($colorbox_style, 'colorbox/example') !== FALSE) || $config->get('colorbox_caption_trim')) && (strlen($caption) > $trim_length)) {
    $caption = substr($caption, 0, $trim_length - 5) . '...';