Title: Problem with pdb-before_submit_update
Last modified: January 27, 2023

---

# Problem with pdb-before_submit_update

 *  Resolved [nasgaard](https://wordpress.org/support/users/nasgaard/)
 * (@nasgaard)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problem-with-pdb-before_submit_update/)
 * I wrote a plugin a few years ago that uses the pdb-before_submit_update hook 
   to validate info prior to updating the database. If there was erroneous info 
   in the update record I returned an empty array, which seemed to work fine, no
   DB update was performed. Now, when an empty array is returned, PDB seems to null
   out most of the fields in that record for which the hook was called. Has there
   been some change in behaviour for this hook?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problem-with-pdb-before_submit_update/#post-16415551)
 * That filter is for the purpose of modifying the submission data or performing
   some other task based on the submitted data. It wasn’t intended to be used to
   prevent a submission from getting processed.
 * Several months ago, we completely refactored how the submissions are processed,
   so that’s probably when your custom code stopped working as expected.
 * The basic problem is that after that filter is applied to the data, the form 
   submission is processed, and there’s no check to see if it should be processed
   or not at that point.
 * The best filter to use if you want to abort a submission is _pdb-check\_submission_,
   which expects a true or false in return. A function that uses that filter would
   inspect the $_POST array and it can abort the submission by returning a false.
   This filter is usually used to prevent spam or other unwanted submissions.
 *  Thread Starter [nasgaard](https://wordpress.org/support/users/nasgaard/)
 * (@nasgaard)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problem-with-pdb-before_submit_update/#post-16417789)
 * Thanks very much for your response. I will rework my plugin using your suggested
   API.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem with pdb-before_submit_update’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [nasgaard](https://wordpress.org/support/users/nasgaard/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/problem-with-pdb-before_submit_update/#post-16417789)
 * Status: resolved