advanced-forms icon indicating copy to clipboard operation
advanced-forms copied to clipboard

Squash notice when accessing missing redirect arg

Open markjaquith opened this issue 3 years ago • 2 comments

CleanShot 2021-08-13 at 14 32 09@2x

markjaquith avatar Aug 13 '21 18:08 markjaquith

Hi, @markjaquith! I'm sorry about the really, really late reply to this! I realize you might not be working on this project anymore but if you do, I would appreciate your input!

I find it weird that $args wouldn't have redirect given that it should always be added when the form is rendered. Do you have some custom code which could be causing this warning or am I missing something?

fabianlindfors avatar May 13 '22 13:05 fabianlindfors

@fabianlindfors I'm not exactly sure why "redirect" isn't being sent. Given that there are two plugins (at least) in play, it could be any number of things. But I still think this change is good as "defense in depth". Like, sure, you expect the field to be there, but it's good to avoid spewing notices, warnings, etc when the field is missing, especially if that thing being missing doesn't stop the main functionality from proceeding.

markjaquith avatar May 17 '22 14:05 markjaquith