Commit 79c9c8fc authored by Edmund Dunn's avatar Edmund Dunn Committed by Steve Wirt
Browse files

Issue #3308887 by edmund.dunn, swirt: PHP 8.1 Strtolower no longer accepts NULL.

parent fb406b52
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -892,7 +892,8 @@ class NodeLinkReport extends BlockBase implements ContainerFactoryPluginInterfac
    // Add space to make sure it exists.
    $url = str_replace('tel:', 'tel: ', $url);
    // Check for mailto, and other schemes that can not be curled.
    $scheme = strtolower(parse_url($url, PHP_URL_SCHEME));
    $scheme = parse_url($url, PHP_URL_SCHEME) ?? '';
    $scheme = strtolower($scheme);
    $non_curlable = ['mailto', 'im', 'sms', 'tel'];
    if (in_array($scheme, $non_curlable)) {
      // This is not curl-able but is a valid scheme, so skip it.