- Issue created by @koosvdkolk
- π³π±Netherlands koosvdkolk
<?php if ($option_name !== 'replace' && empty($this->configuration[$option_name])) { ?>
seems to do the trick.
- πΊπΈUnited States alison
I ran into this today, while trying to fix a bunch of alt attribute values that people left with meaningless placeholder values (and they should really be empty anyway).
This worked, on line 95 -- h/t @danflanagan8 on Slack:
if (!(array_key_exists($option_name, $this->configuration))) {
But I can also see the merit of @koosvdkolk's suggestion in #2, because (again, h/t @danflanagan8 on Slack), maybe no other options should be allowed to be empty?
Probably we need maintainer input on this!
- First commit to issue fork.
- Merge request !89Allow replacing with an empty string on dom_str_replace migrate process plugin β (Open) created by marvil07
- Status changed to Needs review
3 months ago 6:08pm 14 March 2024 - π΅πͺPeru marvil07
I was also trying to do a replace with empty today, and noticed the problem.
But I can also see the merit of @koosvdkolk's suggestion in #2, because (again, h/t @danflanagan8 on Slack), maybe no other options should be allowed to be empty?
Exactly, in all other cases options needs a value, so allowing empty of them may not make sense.
I ended up with a variation of the same idea in the code above.
I opened related MR !89 about it, with one commit.
- 804f2e2 Allow replacing with an empty string on dom_str_replace migrate process plugin
Marking as NR.