Title: PHP errors when Debug enabled
Last modified: August 22, 2016

---

# PHP errors when Debug enabled

 *  [buzzworkers](https://wordpress.org/support/users/buzzworkers/)
 * (@buzzworkers)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/)
 * I’m not sure i’m having the same exact error for the same cause, but when i enable
   PHP debug ALL on my wp_config i get a few warning and notice :
 * backend :
 * Notice: Undefined index: search_field in /home/ttip/stop-ttip-ceta-tisa.eu/wp-
   content/plugins/participants-database/classes/PDb_List_Admin.class.php on line
   885
 * Notice: Undefined index: search_op in /home/ttip/stop-ttip-ceta-tisa.eu/wp-content/
   plugins/participants-database/classes/PDb_List_Admin.class.php on line 885
 * Notice: Undefined index: sort_by in wp-content/plugins/participants-database/
   classes/PDb_List_Admin.class.php on line 885
 * Notice: Undefined index: sort_order in /wp-content/plugins/participants-database/
   classes/PDb_List_Admin.class.php on line 885
 * frontend : (making this page not able to load at all in fact)
 * Notice: Trying to get property of non-object in wp-content/plugins/participants-
   database/participants-database.php on line 2940
 * Warning: Cannot modify header information – headers already sent by (output started
   at /wp-content/plugins/participants-database/participants-database.php:2940) 
   in /wp-includes/pluggable.php on line 1121
 * can you help me pin point the issue here ?
 * latest version of wp
    Avada PHP 5.4
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236838)
 * The backend warnings are all fixed in the upcoming release.
 * The frontend problem? Again, fixed, this only comes up under circumstances where
   the $post object is unavailable.
 * You can fix it yourself with:
 *     ```
       public static function post_check_shortcode() {
           global $post;
           $tag = '[pdb_';
           if (is_object($post) && self::has_shortcode($post->post_content, $tag)) {
             self::$shortcode_present = true;
           }
         }
       ```
   
 *  Thread Starter [buzzworkers](https://wordpress.org/support/users/buzzworkers/)
 * (@buzzworkers)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236839)
 * thanks a lot for your support, just one question, where do i have to put this
   exactly ?
 *  Thread Starter [buzzworkers](https://wordpress.org/support/users/buzzworkers/)
 * (@buzzworkers)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236841)
 * by the way if looking for beta testers, i’m willing to test latest version on
   our site, your plugin is a essential part of our website
    and giving feedback
   and testing would be the least we can do 🙂
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236842)
 * Ah,I thought you had looked at it already… it’s the spot in the script named 
   in the error: around line 2940 in participants-database.php, you’ll see this 
   function. replace it with the one I posted here.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236843)
 * Yes, please I need more testers. Visit this page for the details. Please email
   me if you are going to test: [Participants Database Beta Test](http://xnau.com/participants-database-beta-test/)
 *  Thread Starter [buzzworkers](https://wordpress.org/support/users/buzzworkers/)
 * (@buzzworkers)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236844)
 * ok logically found where to place your code snipet, testing now
 *  Thread Starter [buzzworkers](https://wordpress.org/support/users/buzzworkers/)
 * (@buzzworkers)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236845)
 * errors are gone indeed but by output.txt log still trace these PDB related notice/
   log when activated :
 * [29-Aug-2014 18:58:24 UTC] PHP Strict Standards: call_user_func_array() expects
   parameter 1 to be a valid callback, non-static method PDb_Init::on_activate()
   should not be called statically in /home/ttip/stop-ttip-ceta-tisa.eu/wp-includes/
   plugin.php on line 470
    [29-Aug-2014 18:58:24 UTC] participants-database plugin
   activated [29-Aug-2014 18:59:19 UTC] PDb_List::_setup_iteration list query: SELECT
   p.id, p.name_of_organisation, p.city, p.country, p.twitter, p.website, p.email,
   p.facebook FROM wp_bw7bac_participants_database p ORDER BY p.name_of_organisation
   ASC [29-Aug-2014 19:00:25 UTC] PDb_List::_setup_iteration list query: SELECT 
   p.id, p.name_of_organisation, p.city, p.country, p.twitter, p.website, p.email,
   p.facebook FROM wp_bw7bac_participants_database p ORDER BY p.name_of_organisation
   ASC
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236868)
 * Thanks, I’m aware of these. Some of them are debugging statements, nothing serious.
   You may want to turn off “show_errors” in your PHP configuration, and log these
   to the error log.

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

The topic ‘PHP errors when Debug enabled’ 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/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [undefined index](https://wordpress.org/support/topic-tag/undefined-index/)

 * 8 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/php-errors-when-debug-enabled/#post-5236868)
 * Status: not resolved