Notice: Undefined variable: query_string in cache_actions_rules_cache_get_id()

Created on 23 August 2019, about 5 years ago
Updated 3 March 2023, over 1 year ago

Problem/Motivation

Adding text to a undeclared variable leads to annoying PHP notices.

Proposed resolution

simple patch to init the variable before actually adding content to it.

 foreach ($query as $key => $value) {

    // just a little check
    if(!isset($query_string)){
      $query_string = '';
    }
    // go on, chain away now!
    $query_string .= $key . '=' . $value . '&';
  }
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany giuspe Berlin

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