Support for namespaced email handler classes
-
Hi!
I really like your plugin, but now I’ve ran into the issue where our custom e-mail classes under namespaces trigger fatal error on preview.
I’ve debugged it and found out that
$_POST['choose_email']
was escaping backslashes which propagated all the way to the request, so that class nameVendor\Ns\Something
would becomeVendor\\Ns\\Something
and no longer match a key for a handler in array$this->emails
and fail.Solution could be as easy as to make the following improvement:
// From $index = esc_attr( $_POST['choose_email'] ); // To $index = esc_attr( stripslashes( $_POST['choose_email'] ) );
Or something else, as long as it’s solid ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Support for namespaced email handler classes’ is closed to new replies.