- Issue created by @darkodev
- @darkodev opened merge request.
- Status changed to Needs review
over 1 year ago 5:16am 8 March 2023 -
joelpittet →
committed 08f9ba43 on 7.x-1.x authored by
darkodev →
Issue #3346615 by darkodev: Undefined variable $rcontexts in...
-
joelpittet →
committed 08f9ba43 on 7.x-1.x authored by
darkodev →
- Status changed to Fixed
over 1 year ago 5:20am 8 March 2023 - 🇨🇦Canada joelpittet Vancouver
Thanks @darkodev, there are possible paths where the variable is not initialized, seems safe enough to commit
- 🇨🇦Canada joelpittet Vancouver
@darkodev please take a look at 🐛 Incorrect context passed to ctools_context_get_context_from_relationship() Needs review as it has a similar change and another change, needs a review considering I committed this
- 🇨🇦Canada darkodev
@joelpittet My fix addresses the primary issue in https://www.drupal.org/project/ctools/issues/3216839: →
"[...] if the relationship's context is not present, then the context passed to the relationship is whatever the variable $rcontexts was last set to in the previous loops."
"The quick fix for passing the wrong context would be to ensure $rcontext is unset/reset on each loop."Setting $rcontexts to array() or NULL does not seem to change the behaviour of ctools_context_get_context_from_relationship(), but setting it to NULL would align it with the other issue.
Perhaps the secondary issue in https://www.drupal.org/project/ctools/issues/3216839 🐛 Incorrect context passed to ctools_context_get_context_from_relationship() Needs review about contexts qualifies as a separate issue, as it is specific to views_panes.inc?
Automatically closed - issue fixed for 2 weeks with no activity.