Shape 5

Wordpress Club Themes => Aurora Dawn - Club => : jc786 February 03, 2011, 11:07:07 AM



: Fatal error: Cannot redeclare
: jc786 February 03, 2011, 11:07:07 AM
HI
I'm getting this error messagage. Can you please advise what it might be?

Fatal error: Cannot redeclare s5_acc_internal_styles() (previously declared in /home2/humanhel/public_html/muslimpetitions/wp-content/plugins/mod_s5_accordion_menu/mod_s5_accordion_menu.php:27) in /home2/humanhel/public_html/muslimpetitions/wp-content/plugins/mod_s5_accordion_menu/mod_s5_accordion_menu.php on line 27

Here is the code from line 25-28
if($acc_need_css == '1'){
         define('S5_ACC_PATH', WP_PLUGIN_URL . '/mod_s5_accordion_menu/');          
         function s5_acc_internal_styles(){echo '<link rel="stylesheet" href="'.S5_ACC_PATH.'css/s5_accordion_menu.css" type="text/css" />';}
         add_action('wp_head','s5_acc_internal_styles');} ?>


Thanks


: Re: Fatal error: Cannot redeclare
: Tristan Rineer February 03, 2011, 05:35:04 PM
Please try commenting out that block of code like this, and let me know if that fixes the problem:
:
/** if($acc_need_css == '1'){
         define('S5_ACC_PATH', WP_PLUGIN_URL . '/mod_s5_accordion_menu/');         
         function s5_acc_internal_styles(){echo '<link rel="stylesheet" href="'.S5_ACC_PATH.'css/s5_accordion_menu.css" type="text/css" />';}
         add_action('wp_head','s5_acc_internal_styles');} **/?>

Our demo site doesn't seem to have that problem, so it could be something specific to your server.  If you notice, the error message is saying that it's trying to repeat that line a second time, which is somewhat unusual.  If that fixes it, great.  If not, I'll be glad to take another look and see if there's something else that can be done.