- Issue created by @danharper
- πΊπΈUnited States shelane
The code that calls the cleanvar method:
foreach ($labels as $key => $var) { // If we find a replacement variable, replace it. if (strpos($equalto, "{{ $key }}") !== FALSE) { $field = $this->cleanVar($fields[$key]); $equalto = str_replace("{{ $key }}", $field, $equalto); } if (strpos($then, "{{ $key }}") !== FALSE) { $field = $this->cleanVar($fields[$key]); $then = str_replace("{{ $key }}", $field, $then); } if (strpos($or, "{{ $key }}") !== FALSE) { $field = $this->cleanVar($fields[$key]); $or = str_replace("{{ $key }}", $field, $or); } }
It looks like it's dealing with strings. What recommendation do you have for providing an "inclusive" type?
I'll be out the next couple of hours, but I can look at this more when I get back.
- πΊπΈUnited States grasmash
Issue is that cleanVar() is set to accept only strings. But in the function body, it clearly expects to receive an object as it immediately checks for a ->last_render property.
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - @grasmash opened merge request.
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass -
shelane β
committed 8c9cae92 on 8.x-1.x authored by
grasmash β
Issue #3399957 by grasmash, danharper: Argument #1 ($var) must be of...
-
shelane β
committed 8c9cae92 on 8.x-1.x authored by
grasmash β
- Status changed to Fixed
about 1 year ago 8:38pm 7 November 2023 - πΊπΈUnited States shelane
I appreciate the extra eye. I've got a bit much on my plate right now. I'll tag the updated release as soon as I get back.
- πΊπΈUnited States grasmash
No problem. Thanks for maintaining this module.
- π¬π§United Kingdom danharper
Just tried the latest dev but that hasn't worked, I'll try and have a look at the code later to see if I can patch.
Should cleanVar only be used if I actually tick strip tags?
The function is stripping the markup.
Automatically closed - issue fixed for 2 weeks with no activity.