WPChill / strong-testimonials

A WordPress plugin for client testimonials.
GNU General Public License v3.0
21 stars 11 forks source link

Warnings on forms without content #379

Closed TeoAlex closed 1 year ago

TeoAlex commented 1 year ago

Describe the bug https://secure.helpscout.net/conversation/2173414596/55049?folderId=4656052 Warnings that an undefined array key "post_content" is found in 2 cases:

  1. If in submission form's "Testimonial Content" field is missing and the testimonial is submitted without a heading.
  2. If in submission form's "Testimonial Content" and admin notification on testimonial submit is checked in form's settings.

Plugin is creating a testimonial title from the first 5 words of the "Testimonial Content" field and if both are empty, they trigger an error here

To Reproduce Steps to reproduce the behavior:

  1. Go to Submissions Form and remove the "Testimonial Content" field
  2. Go to Submissions Form's settings and check "Notification Email"
  3. Add the form in a page
  4. Submit the form without adding a header ( make it not mandatory in form's settings if it is )