Title: [Plugin: Countdown Timer] Fatal error: Cannot redeclare cmp() (previously declared &#8230;. gcal-sidebar
Last modified: August 20, 2016

---

# [Plugin: Countdown Timer] Fatal error: Cannot redeclare cmp() (previously declared …. gcal-sidebar

 *  Resolved [UTLIBOURNE](https://wordpress.org/support/users/utlibourne/)
 * (@utlibourne)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-countdown-timer-fatal-error-cannot-redeclare-cmp-previously-declared-gcal-sidebarphp/)
 * Hello from France
 * I’ve two plugins which use the same cmp() function :
 * So when i try to create an event , i get the following message :
    “ Fatal error:
   Cannot redeclare **cmp() (previously declared** in F:\inetpub\vhosts\xxxx.com\
   httpdocs\ddddd\wp-content\plugins\gcal-sidebar\gcal-sidebar.php:30) in F:\inetpub\
   vhosts\xxxx.com\httpdocs\ddddd\wp-content\plugins\countdown-timer\fergcorp_countdownTimer.
   php on line 1022 “
 * In gcal sidebar :
    “ _**function cmp($a, $b)** { if($a[‘startTime’] > $b[‘startTime’])
   return 1; if($a[‘startTime’] == $b[‘startTime’]) return 0; if($a[‘startTime’]
   < $b[‘startTime’]) return -1; }
 * In fercop :
    “ _/*Begin sorting events by time*/ **function cmp($adate, $bdate)**{
   if($adate < $bdate){ return -1; }else if($adate == $bdate){ return 0; }else{ 
   return 1;  “
 * Desactivation then activation of the plugin without succes .
 * How can i fix this ?
 * Many thanks,
 * Didier
 * [http://wordpress.org/extend/plugins/countdown-timer/](http://wordpress.org/extend/plugins/countdown-timer/)

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

 *  Thread Starter [UTLIBOURNE](https://wordpress.org/support/users/utlibourne/)
 * (@utlibourne)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-countdown-timer-fatal-error-cannot-redeclare-cmp-previously-declared-gcal-sidebarphp/#post-2916634)
 * Hello,
 * I’ve changed the name – In gcal sidebar – of the function cmp($a, $b) …
    with:
   function cmp**e**($a, $b) ,
 * and both the plugins work properly .
 * Is there a way to check such “identical naming ” evrythere in all the php files?
 * Didier
 *  Plugin Author [fergbrain](https://wordpress.org/support/users/fergbrain/)
 * (@fergbrain)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-countdown-timer-fatal-error-cannot-redeclare-cmp-previously-declared-gcal-sidebarphp/#post-2916774)
 * This is a bug. For various reasons, I thought this should not happen..but PHP
   is weird like that. It’s been fixed as of commit 9b65880968 and will be part 
   of the next release. Sorry for the inconvenience 🙁

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

The topic ‘[Plugin: Countdown Timer] Fatal error: Cannot redeclare cmp() (previously
declared …. gcal-sidebar’ is closed to new replies.

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

## Tags

 * [declared](https://wordpress.org/support/topic-tag/declared/)
 * [fatal](https://wordpress.org/support/topic-tag/fatal/)
 * [previously](https://wordpress.org/support/topic-tag/previously/)

 * 2 replies
 * 2 participants
 * Last reply from: [fergbrain](https://wordpress.org/support/users/fergbrain/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-countdown-timer-fatal-error-cannot-redeclare-cmp-previously-declared-gcal-sidebarphp/#post-2916774)
 * Status: resolved