Commit 10a39d28 authored by Mark Dorison's avatar Mark Dorison Committed by Mike Herchel
Browse files

Issue #3257454 by markdorison, mherchel: Deprecated function: explode():...

Issue #3257454 by markdorison, mherchel: Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in quicklink_preprocess_html()
parent 6c1b0949
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ function quicklink_preprocess_html(&$variables, $hook) {
  $allowed_domains = [];

  // Populate and remove line returns from URL patterns to ignore.
  foreach (explode(PHP_EOL, $config->get('url_patterns_to_ignore')) as $value) {
  foreach (explode(PHP_EOL, (string) $config->get('url_patterns_to_ignore')) as $value) {
    $pattern = str_replace("\r", '', $value);

    if (!empty($pattern)) {
@@ -99,7 +99,7 @@ function quicklink_preprocess_html(&$variables, $hook) {

  // Populate and remove line returns from "Ignore Selectors".
  $ignore_selectors = [];
  foreach (explode(PHP_EOL, $config->get('ignore_selectors')) as $value) {
  foreach (explode(PHP_EOL, (string) $config->get('ignore_selectors')) as $value) {
    $pattern = str_replace("\r", '', $value);

    if (!empty($pattern)) {
@@ -109,7 +109,7 @@ function quicklink_preprocess_html(&$variables, $hook) {
  }

  // Populate and remove line returns from allowed domains.
  foreach (explode(PHP_EOL, $config->get('allowed_domains')) as $value) {
  foreach (explode(PHP_EOL, (string) $config->get('allowed_domains')) as $value) {
    $domain = str_replace("\r", '', $value);

    if (!empty($domain)) {
@@ -118,7 +118,7 @@ function quicklink_preprocess_html(&$variables, $hook) {
  }

  // Populate and remove line returns from "Prefetch these paths only".
  foreach (explode(PHP_EOL, $config->get('prefetch_only_paths')) as $value) {
  foreach (explode(PHP_EOL, (string) $config->get('prefetch_only_paths')) as $value) {
    $path = str_replace("\r", '', $value);

    if (!empty($path)) {