Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Troublesome attribute value gets cleared silently. #236

Open
bitwombat opened this issue Dec 15, 2019 · 1 comment
Open

Troublesome attribute value gets cleared silently. #236

bitwombat opened this issue Dec 15, 2019 · 1 comment

Comments

@bitwombat
Copy link

This code in AbstractHelper.php has the effect of silently failing:

        try {
            $escapedAttribute = $escapeAttr($value);
            $strings[] = sprintf('%s="%s"', $escape($key), $escapedAttribute);
        } catch (EscaperException $x) {
            // If an escaper exception happens, escape only the key, and use a blank value.
            $strings[] = sprintf('%s=""', $escape($key));
        }

Some problem with my attribute value was resulting in an exception and thus a blank value, as intended by the above code. I would have much preferred seeing the exception, instead of having to trace it down to this bit of code.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-form; a new issue has been opened at laminas/laminas-form#1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants