Title: setcookie() parameter error on php 7
Last modified: August 31, 2016

---

# setcookie() parameter error on php 7

 *  Resolved [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/setcookie-parameter-error-on-php-7/)
 * I just switched my server from php 5.6.21 to php 7.0.6 for a treat – but now 
   I keep getting an error message in the WP dashboard:
 * > Warning: setcookie() expects parameter 3 to be integer, float given in /home/
   > www/wp-content/plugins/wpclef/includes/lib/wp-session/class-wp-session.php 
   > on line 130
 * Clef login works apparently, but still this error looks a bit annoying…
 * [https://wordpress.org/plugins/wpclef/](https://wordpress.org/plugins/wpclef/)

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

 *  Plugin Contributor [inthylight](https://wordpress.org/support/users/inthylight/)
 * (@inthylight)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/setcookie-parameter-error-on-php-7/#post-7391571)
 * [@the](https://wordpress.org/support/users/the/).mnbvcx
 * Thank you for reporting this issue. I have verified it and submitted [a fix](https://github.com/clef/clef-wordpress/pull/246)(
   beta).
 * The change for the fix is very small and thus should be safe to run; if you would
   like to test drive the beta (and loose the error message), delete the currently
   installed plugin via the Plugins menu, then [download this beta .zip](https://github.com/clef/clef-wordpress/archive/fix-php7-setcookie.zip)
   and install via the Plugins -> Add New -> Upload option (near the top).
 * Please let me know if you run into any issues.
 *  Thread Starter [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * (@themnbvcx-1)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/setcookie-parameter-error-on-php-7/#post-7391582)
 * Laurence,
    thx for the quick fix – applied it and indeed the error msg is gone.

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

The topic ‘setcookie() parameter error on php 7’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpclef_4ab6e4.svg)
 * [Clef Two-Factor Authentication](https://wordpress.org/plugins/wpclef/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpclef/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpclef/)
 * [Active Topics](https://wordpress.org/support/plugin/wpclef/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpclef/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpclef/reviews/)

## Tags

 * [PHP7](https://wordpress.org/support/topic-tag/php7/)
 * [setcookie](https://wordpress.org/support/topic-tag/setcookie/)

 * 2 replies
 * 2 participants
 * Last reply from: [the.mnbvcx](https://wordpress.org/support/users/themnbvcx-1/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/setcookie-parameter-error-on-php-7/#post-7391582)
 * Status: resolved