diff --git a/src/api/wishes.php b/src/api/wishes.php index 9304493c..15166488 100644 --- a/src/api/wishes.php +++ b/src/api/wishes.php @@ -93,10 +93,10 @@ switch ($_SERVER['REQUEST_METHOD']) { break; } - $wish_title = addslashes(filter_input(INPUT_POST, 'wish_title', FILTER_SANITIZE_SPECIAL_CHARS)); - $wish_description = addslashes(filter_input(INPUT_POST, 'wish_description', FILTER_SANITIZE_SPECIAL_CHARS)); - $wish_image = addslashes(filter_input(INPUT_POST, 'wish_image', FILTER_SANITIZE_URL)); - $wish_url = addslashes(filter_input(INPUT_POST, 'wish_url', FILTER_SANITIZE_URL)); + $wish_title = addslashes(filter_input(INPUT_POST, 'wish_title', FILTER_SANITIZE_SPECIAL_CHARS) ?? ''); + $wish_description = addslashes(filter_input(INPUT_POST, 'wish_description', FILTER_SANITIZE_SPECIAL_CHARS) ?? ''); + $wish_image = addslashes(filter_input(INPUT_POST, 'wish_image', FILTER_SANITIZE_URL) ?? ''); + $wish_url = addslashes(filter_input(INPUT_POST, 'wish_url', FILTER_SANITIZE_URL) ?? ''); $wish_priority = filter_input(INPUT_POST, 'wish_priority', FILTER_SANITIZE_NUMBER_INT); $wish_is_purchasable = isset($_POST['wish_is_purchasable']);