I recently enable mail, imap, smtp, webmail, and webmail_ajax. When I enable webmail_ajax, I receive the following error:
Fatal error: Cannot redeclare webmail_menu() (previously declared in /root/path/to/modules/webmail/webmail.module:18) in /root/path/to/modules/webmail/webmail_ajax/webmail_ajax.module on line 5
Here are the first 10 lines of code.
<?php
// $Id: webmail_ajax.module,v 1.1 2007/08/24 20:41:11 gcopenhaver Exp $
function webmail_menu($may_cache) {
$items = array();
if(!$may_cache) {
$items[] = array(
'title' => t('Ajax'),
'path' => 'webmail/ajax',I change the variable name in line five to equal webmail_ajax_menu and the error goes away. This is an FYI. I'm uncertain if this caused any other problems.
Comments
Comment #1
preventingchaos commentedThanks. I fixed it in 5.x-1.x-dev, and gave you credit for it in the cvs commit comments.
Comment #2
pyutaros commentedThanks to you as well.
Comment #3
(not verified) commented