advancedforms / advanced-forms

WordPress plugin to create forms using Advanced Custom Fields
75 stars 14 forks source link

Squash notice when accessing missing redirect arg #95

Closed markjaquith closed 1 year ago

markjaquith commented 3 years ago

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

fabianlindfors commented 2 years ago

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?

markjaquith commented 2 years ago

@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.