Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion includes/Classes/AdminAjaxHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ protected function createForm()
$postTitle = sanitize_text_field($_REQUEST['post_title']);
if (!$postTitle) {
$postTitle = 'Blank Form';
return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Logic bug - early return removed

The return; statement was removed from this if block. This changes the behavior:

  • Old behavior: If $_REQUEST['post_title'] is empty, set title to 'Blank Form' and RETURN early (don't create form)
  • New behavior: If $_REQUEST['post_title'] is empty, set title to 'Blank Form' and CONTINUE to create the form

This appears to be an unintended change. If the intent was to allow blank forms, this is correct. But if the original behavior (rejecting empty titles) was intended, the return; needs to be restored.

$template = sanitize_text_field($_REQUEST['template']);

Expand Down