PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
← All changes | src/DonationForms/Repositories/DonationFormRepository.php +6 -3 4.17.0 → 4.18.0 View file →
@@ -69,8 +69,9 @@
69 69 ->get();
70 70 }
71 71
72 72 /**
73 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
73 74 * @since 3.7.0 Add post_excerpt to the list of fields being inserted
74 75 * @since 3.0.0
75 76 *
76 77 * @return void
@@ -130,9 +131,9 @@
130 131 DB::query('ROLLBACK');
131 132
132 133 Log::error('Failed creating a donation form', compact('donationForm'));
133 134
134 - throw new $exception('Failed creating a donation form');
135 + throw new Exception('Failed creating a donation form', 0, $exception);
135 136 }
136 137
137 138 DB::query('COMMIT');
138 139
@@ -147,8 +148,9 @@
147 148 Hooks::doAction('givewp_donation_form_created', $donationForm);
148 149 }
149 150
150 151 /**
152 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
151 153 * @since 3.7.0 Add post_excerpt to the list of fields being updated
152 154 * @since 3.0.0
153 155 *
154 156 * @param DonationForm $donationForm
@@ -205,9 +207,9 @@
205 207 DB::query('ROLLBACK');
206 208
207 209 Log::error('Failed updating a donation form', compact('donationForm'));
208 210
209 - throw new $exception('Failed updating a donation form');
211 + throw new Exception('Failed updating a donation form', 0, $exception);
210 212 }
211 213
212 214 DB::query('COMMIT');
213 215
@@ -214,8 +216,9 @@
214 216 Hooks::doAction('givewp_donation_form_updated', $donationForm);
215 217 }
216 218
217 219 /**
220 + * @since 4.18.0 Keep the original error as the previous exception when the write fails.
218 221 * @since 3.0.0
219 222 *
220 223 * @throws Exception
221 224 */
@@ -237,9 +240,9 @@
237 240 DB::query('ROLLBACK');
238 241
239 242 Log::error('Failed deleting a donation form', compact('donationForm'));
240 243
241 - throw new $exception('Failed deleting a donation form');
244 + throw new Exception('Failed deleting a donation form', 0, $exception);
242 245 }
243 246
244 247 DB::query('COMMIT');
245 248