= is added URL query string after ?key without a value

Created on 15 November 2017, over 7 years ago
Updated 20 May 2025, about 4 hours ago

The issue is due to the fact that the query string, in this case '/content.html' has no value. It is just a key in the query string key/value pair sense. This itself shouldn't be an issue but at a certain point redirect module calls drupal_http_build_query() which when checking for a key only query string value looks for a value of NULL.

    // If a query parameter value is NULL, only append its key.
    elseif (!isset($value)) {
      $params[] = $key;
    }
    else {
      // For better readability of paths in query strings, we decode slashes.
      $params[] = $key . '=' . str_replace('%2F', '/', rawurlencode($value));
    }

The query string by the time it is passed to drupal_http_build_query has already been parsed as ('key' => '') instead of ('key' => NULL) and so the equals sign ends up getting added.

Child of / are substituted by %2F in URL string after ? πŸ› / are substituted by %2F in URL string after ? Closed: outdated pulling out the second issue identified from the original issues report. This should help sort out and provide a working patch for others experiencing this particular issue at the moment.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States whthat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024