Commit 9bdf22b1 authored by Eric Windham's avatar Eric Windham

added check to make sure the form id is numeric

parent 7f04f1c2
......@@ -48,6 +48,10 @@ final class NF_Display_Preview
{
if ( ! is_user_logged_in() ) return __( 'You must be logged in to preview a form.', 'ninja-forms' );
if( ! is_numeric( $this->_form_id ) ) {
return __( 'You must provide a valid form ID.', 'ninja-forms' );
}
return do_shortcode( "[nf_preview id='{$this->_form_id}']" );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment