Title: Error Message On Re-Direct
Last modified: August 30, 2016

---

# Error Message On Re-Direct

 *  Resolved [Rysk](https://wordpress.org/support/users/rysk/)
 * (@rysk)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/)
 * Hello
 * The plug-in was working fine but I just tried to add a new affiliate link/re-
   direct
 * **Upon saving 2 things happened**
    1) site-name goes to > site-name-2
 * 2) Upon testing the link/ re-direct I get the following error return:
 * Warning: array_key_exists() expects parameter 2 to be array, boolean given in/
   home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.php
   on line 45
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.
   php:45) in /home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.
   php on line 24
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.
   php:45) in /home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.
   php on line 25
 * W**hat have i done?**
 * 1) De-activated and re-activated the plug-in
    2) De-activated all my other plug-
   ins
 * Neither solved the problem(s)
 * All the previous link that I added before are fine
 * One thing I noticed is that in setting I added a customer re-direct of ‘visit’,
   preferring this to the other choices. I can no longer see where I added this
 * [https://wordpress.org/plugins/thirstyaffiliates/](https://wordpress.org/plugins/thirstyaffiliates/)

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

 *  Thread Starter [Rysk](https://wordpress.org/support/users/rysk/)
 * (@rysk)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642731)
 * please ignore
 * > One thing I noticed is that in setting I added a customer re-direct of ‘visit’,
   > preferring this to the other choices. I can no longer see where I added this
 *  i see how i added this now
 *  [Josh Kohlbach](https://wordpress.org/support/users/jkohlbach/)
 * (@jkohlbach)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642792)
 * No worries Rysk!
 * Warning: array_key_exists() expects parameter 2 to be array, boolean given in/
   home/bestcasi/public_html/wp-content/themes/sportsbook/includes/redirects.php
   on line 45
 * This indicates there is an error in your theme.
 * array_key_exists is expecting the second parameter to be an array but it isn’t.
 * The subsequent error messages are shown because it can’t rewrite the header during
   the redirect because the printing of that error message is stopping it.
 * If you can’t fix the problem can you hide PHP warnings on this server?
 * Cheers,
    Josh
 *  Thread Starter [Rysk](https://wordpress.org/support/users/rysk/)
 * (@rysk)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642809)
 * Hi, thanks for the reply
 * I’m not a coder…
    Warning 1 – so this is something the theme owner can help with?
 * Other Warnings – this is something the web host can help with?
    Hiding php warnings
   on the server
 * Why though the problem now, and why are all the previous 10 re-direct links working?
 * Cheers
 *  [Josh Kohlbach](https://wordpress.org/support/users/jkohlbach/)
 * (@jkohlbach)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642845)
 * Hi Rysk,
 * Warning 1 is the cause of the other two warnings, once that is fixed the whole
   lot will be fixed.
 * Hiding PHP warnings might be something the host could help with though.
 * Let me know how you go fixing this issue and if it’s still playing up after that
   we will help you investigate further.
 *  Thread Starter [Rysk](https://wordpress.org/support/users/rysk/)
 * (@rysk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642943)
 * Hi,
 * Further to my last email, I went back to the plug-in just to see if by any chance
   it had fixed itself before I emailed the theme owner.
 * I added a link and this time all the page types where I had added the affiliate
   links disappeared completely.
 * Luckily I was able to get a restore from the hosting company, do you have any
   idea what’s going on
 * At the moment i’m very reticent to touch anything and think it may be best to
   change to another plug-in
 *  [Josh Kohlbach](https://wordpress.org/support/users/jkohlbach/)
 * (@jkohlbach)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642944)
 * Hey Rysk,
 * I highly recommend running a backup plugin, there’s many out there like BackupBuddy
   or even free ones like UpdraftPlus [https://wordpress.org/plugins/updraftplus/](https://wordpress.org/plugins/updraftplus/)
 * Can you:
 * 1. Switch to TwentyFifteen or similar default theme temporarily
    2. Make a backup
   and then try rebuilding your affiliate links (Settings->Scroll to bottom and 
   hit save and rebuild) 3. Try creating a new link and see if you have the same
   problem. Given the previous issues it sounds like something is conflicting (and
   I suspect it’s the theme, hence #1).
 * Hope this helps narrow it down
 * Josh

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

The topic ‘Error Message On Re-Direct’ is closed to new replies.

 * ![](https://ps.w.org/thirstyaffiliates/assets/icon-256x256.jpg?rev=2686825)
 * [ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin](https://wordpress.org/plugins/thirstyaffiliates/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thirstyaffiliates/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thirstyaffiliates/)
 * [Active Topics](https://wordpress.org/support/plugin/thirstyaffiliates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thirstyaffiliates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thirstyaffiliates/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Josh Kohlbach](https://wordpress.org/support/users/jkohlbach/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/error-message-on-re-direct/#post-6642944)
 * Status: resolved