Unverified Commit 98960a30 authored by Thomas Sliker's avatar Thomas Sliker Committed by Mark Dorison
Browse files

Issue #3306048 by Mirakolous: PHP 8.1 Deprecated function: rtrim(): Passing null to parameter #1

parent fe3e5e99
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -282,7 +282,8 @@ function stage_file_proxy_get_file_remote_url($relative_path, array $options = a

  if (!isset($base_url)) {
    $base_url = FALSE;
    $server = rtrim(variable_get('stage_file_proxy_origin'), '/');
    $origin_dir = variable_get('stage_file_proxy_origin') ?? '/';
    $server = rtrim($origin_dir);

    // Quit if we are the origin. Ignore http(s) in the origin comparison.
    if (preg_replace('#^[a-z]*://#', '', $server) == preg_replace('#^[a-z]*://#', '', $GLOBALS['base_url'])) {