PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | backend/src/Controllers/Notification/DuplicateNotificationController.php +3 -6 0.2.1 → 1.5 View file →
@@ -1,13 +1,8 @@
1 1 <?php
2 2
3 3 namespace IvyForms\Controllers\Notification;
4 4
5 -// phpcs:disable PSR1.Files.SideEffects
6 -if (!defined('ABSPATH')) {
7 - exit; // Exit if accessed directly
8 -}
9 -
10 5 use IvyForms\Common\Exceptions\ForbiddenException;
11 6 use IvyForms\Common\Exceptions\InvalidArgumentException;
12 7 use IvyForms\Common\Exceptions\NotFoundException;
13 8 use IvyForms\Common\Exceptions\QueryExecutionException;
@@ -51,9 +46,11 @@
51 46 Sanitizer::verifyNonce($data->get_header('X-WP-Nonce'));
52 47 // Validate request data
53 48 $notificationId = Sanitizer::sanitizeId($data->get_param('id'));
54 49 if (empty($notificationId)) {
55 - throw new InvalidArgumentException('Notification ID is required.');
50 + throw new InvalidArgumentException(
51 + BackendStrings::getExceptionStrings()['notification_id_required']
52 + );
56 53 }
57 54
58 55 // Retrieve the original notification
59 56 $originalNotification = $this->notificationService->getNotificationById($notificationId);