Title: PHP Warning when using ?debugcookie=#
Last modified: September 5, 2017

---

# PHP Warning when using ?debugcookie=#

 *  Resolved [Andis](https://wordpress.org/support/users/andydegroo/)
 * (@andydegroo)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-warning-when-using-debugcookie/)
 * Apparently, the plugin’s code tries to use a `DateTime` object as the third parameter
   to `setcookie()`.
 * This is the PHP warning and last step in stack trace:
 *     ```
       PHP Warning:  setcookie() expects parameter 3 to be integer, object given in /var/www/[redacted]/wp-content/plugins/debug-objects/debug-objects.php on line 317
       [...]
       PHP  11. setcookie('debug_objects_cookie', 'Debug_Objects_True', class DateTime { public $date = '2017-09-06 07:25:26.000000'; public $timezone_type = 3; public $timezone = 'UTC' }, '/', FALSE) /var/www/[redacted]/wp-content/plugins/debug-objects/debug-objects.php:317
       ```
   
 * Please turn on `WP_DEBUG` constant and set error reporting to `E_ALL` while developing.
   That will save a lot of headaches to you and other fellow developers.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Frank Bueltge](https://wordpress.org/support/users/bueltge/)
 * (@bueltge)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-when-using-debugcookie/#post-9644620)
 * My development environment have all debug messages, include xdebug. If I work
   on this topic and I see errors, warnings and notices I will change, fix them.

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning when using ?debugcookie=#’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/debug-objects_d0d0d1.svg)
 * [Debug Objects](https://wordpress.org/plugins/debug-objects/)
 * [Support Threads](https://wordpress.org/support/plugin/debug-objects/)
 * [Active Topics](https://wordpress.org/support/plugin/debug-objects/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/debug-objects/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/debug-objects/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Frank Bueltge](https://wordpress.org/support/users/bueltge/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-when-using-debugcookie/#post-9644620)
 * Status: resolved