Title: Please Use Unique Function Names
Last modified: August 22, 2016

---

# Please Use Unique Function Names

 *  Resolved [Chris](https://wordpress.org/support/users/web2guru/)
 * (@web2guru)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/)
 * The redirect function should have a more unique name so it doesn’t cause conflicts.
   All plugins should make sure all of their functions names are unique, so I posted
   this on another plugin that uses the same function name, Adminer which produces
   the error, “Fatal error: Cannot redeclare redirect()…”.
 * [https://wordpress.org/plugins/dooodl/](https://wordpress.org/plugins/dooodl/)

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

 *  Plugin Author [noCreativity](https://wordpress.org/support/users/nocreativity/)
 * (@nocreativity)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5388802)
 * Hi Web2Guru,
 * Thanks for pointing that out.
    Could you post the full error-message?
 * I’m currently working on an entirely new version (backend-wise). So I’ll take
   this into account as well.
 *  Thread Starter [Chris](https://wordpress.org/support/users/web2guru/)
 * (@web2guru)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5388862)
 * Sure thing. The error doesn’t actually come up in your plugin, it is only seen
   when another plugin also tries to create a function with the same name. One such
   plugin is Adminer, a phpMyAdmin plugin – I posted a similar topic in their forum.
   Here is the full error (home folder account id replaced):
 * Fatal error: Cannot redeclare redirect() (previously declared in /home/content/
   99/99999999/html/wp-content/plugins/dooodl/Dooodl.php:921) in /home/content/99/
   99999999/html/wp-content/plugins/adminer/inc/adminer/include/functions.inc.php
   on line 512
 *  Plugin Author [noCreativity](https://wordpress.org/support/users/nocreativity/)
 * (@nocreativity)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5389081)
 * Hi Web2Guru,
 * Sorry for that insanely late reply of mine.
    I’m currently working on a new version
   of Dooodl. It will also take into account that no more of these conflicts happen
   anymore.
 * If you have experience in PHP/WordPress, you can go into the Dooodl plugin and
   search for all functions that are called ‘redirect’ and rename them to ‘dooodl_redirect’.
   That should fix the problem for now.
 * What happened here was that I built this plugin way back in the day when I wasn’t
   aware of so many thing that I am now. What I did was I wrote this plugin using
   simple names. Names that anybody could use. The problem with that is that other
   plugin developers could have done the same thing (which happened in your case).
   So both him/her and me both defined a function redirect (which might do completely
   different things) in our own plugins/themes. The problem is that when WP is run,
   the same function name is used twice to define 2 different functions. That’s 
   causes the error above.
 * This will soon be fixed with the release of Dooodl 2.0.
    Promise!
 *  Thread Starter [Chris](https://wordpress.org/support/users/web2guru/)
 * (@web2guru)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5389082)
 * No problem, I just wanted to bring the issue up in hopes that it would get fixed
   in a future version – great to hear that it is already in the works.
 * Yep, I am a PHP/WordPress developer, I build plugins and modify plugins, so that
   is exactly what I did (to either Dooodl or Adminer, I don’t recall).
 *  [iroller](https://wordpress.org/support/users/iroller/)
 * (@iroller)
 * [11 years ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5389115)
 * How is Dooodl 2.0 going? It would be great if it had more paint tools and users
   could vote for their favourite Dooodls.

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

The topic ‘Please Use Unique Function Names’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dooodl_714e6c.svg)
 * [Dooodl](https://wordpress.org/plugins/dooodl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dooodl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dooodl/)
 * [Active Topics](https://wordpress.org/support/plugin/dooodl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dooodl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dooodl/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [redeclare](https://wordpress.org/support/topic-tag/redeclare/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 5 replies
 * 3 participants
 * Last reply from: [iroller](https://wordpress.org/support/users/iroller/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/please-use-unique-function-names-1/#post-5389115)
 * Status: resolved