libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Empty string bug fix #75

Closed kosminen closed 7 years ago

kosminen commented 7 years ago

Check that string is not empty before checking its first character. Pushes an error otherwise if WP is on debug mode.

kosminen commented 7 years ago

Note: Didn't really have time to check whether the check could be done more elegantly somewhere a bit earlier in the code, but at least this does the trick :)

anttiviljami commented 7 years ago

@kosminen looks good. could you quickly fix the code formatting and I'll merge. :)

kosminen commented 7 years ago

@anttiviljami Yes sir-ee, gon' an' don' adding them two spaces. Damn it's hard to get used to that flavour of coding style :)