• 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 name Vendor\Ns\Something would become Vendor\\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 ??

    • This topic was modified 3 years, 1 month ago by Robert.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author digamberpradhan

    (@digamberpradhan)

    Hi @robertgres ,

    I’m glad you’re enjoying the plugin. I recently release version 2.0.1 – with some housekeeping. Can you please test if the new changes are working for your namespaced / custom email scenario as well ?

    Thread Starter Robert

    (@robertgres)

    Hi @digamberpradhan

    Unfortunately, I don’t see any changes in that particular part of code, and continue to get Fatal Errors when trying to preview custom e-mails.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Support for namespaced email handler classes’ is closed to new replies.