Title: What wrong with my function
Last modified: March 11, 2017

---

# What wrong with my function

 *  Resolved [daffy44](https://wordpress.org/support/users/daffy44/)
 * (@daffy44)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/what-wrong-with-my-function/)
 * hi,
    everything works well until i add this function in my personal plugin. since
   backWPup does not work anymore (operation launched but stop) Here is my code 
   Does anyone can tell me what is wrong with my code. Thanks a lot.
 * CODE
    —— * fonction ajout de cookie – pour 1ere visite */ /* etape 1 : ajout 
   du cookie duree 182 jours 6 mois */
 * function o99_set_newvisitor_cookie() {
    if ( !is_admin() && !isset($_COOKIE[‘
   aradaff_1erevisite’])) { setcookie(‘aradaff_1erevisite’, 1, time()+3600*24*182,
   COOKIEPATH, COOKIE_DOMAIN, false); wp_safe_redirect(home_url(‘/welcome/’));exit;}
 * }
    add_action( ‘init’, ‘o99_set_newvisitor_cookie’);

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

 *  Plugin Contributor [Brandon Olivares](https://wordpress.org/support/users/cocreation/)
 * (@cocreation)
 * [9 years ago](https://wordpress.org/support/topic/what-wrong-with-my-function/#post-9054674)
 * Hi [@daffy44](https://wordpress.org/support/users/daffy44/), are you still getting
   this error? What does the backup log say when you have this code included?
 *  Plugin Contributor [Brandon Olivares](https://wordpress.org/support/users/cocreation/)
 * (@cocreation)
 * [9 years ago](https://wordpress.org/support/topic/what-wrong-with-my-function/#post-9085177)
 * [@daffy44](https://wordpress.org/support/users/daffy44/), since we didn’t hear
   back from you, we assume that your problem has been fixed and we can mark this
   ticket as resolved. If we are wrong, please reopen the ticket and provide more
   information, so we can help to find a proper solution for you! 🙂

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

The topic ‘What wrong with my function’ is closed to new replies.

 * ![](https://ps.w.org/backwpup/assets/icon-256x256.png?rev=3236141)
 * [BackWPup – WordPress Backup & Restore Plugin](https://wordpress.org/plugins/backwpup/)
 * [Support Threads](https://wordpress.org/support/plugin/backwpup/)
 * [Active Topics](https://wordpress.org/support/plugin/backwpup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backwpup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backwpup/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Brandon Olivares](https://wordpress.org/support/users/cocreation/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/what-wrong-with-my-function/#post-9085177)
 * Status: resolved