Jump to content

Fatal error - help needed!


valkyrjan

Recommended Posts

Hi all,

 

I was trying to update Tapatalk (from 3.9 to 4.2) on my forum (phpBB 3.0.12) and I get this error when I get to the external installer link (if anyone here's familiar with Tapatalk?) 

 

 

 

Fatal error: Cannot redeclare get_tapatlk_location() (previously declared in /forum/mobiquo/include/function_hook.php:4) /forum/mobiquo/hook/function_hook.php on line 62

 

Here is some of the code from that file, starting at line 50 going down to 62.

 break;
        case "viewonline.php":
            $param_arr['location'] = 'online';
            break;
        default:
            $param_arr['location'] = 'index';
            break;
    }
    $queryString = http_build_query($param_arr);
    $url = generate_board_url() . '/?' .$queryString;
    $url = preg_replace('/^(http|https)/isU', 'tapatalk', $url);
    return $url;
    }

Any ideas? 

Link to comment
Share on other sites

The error says the get_tapatlk_location() function has been declared twice. Once in include/function_hook.php on line 4 and a second time in hook/function_hook.php on line 62 (notice the different folder names).

 

The lines of code you have posted is not the problem. You need to remove the duplicate function declaration to clear the errors. Function names should be unique and only be declared once.

Link to comment
Share on other sites

Thanks - I removed the duplicate function from hook/function_hook.php, but then it brings up the same error for a different function in that file. The location function and this second one are the only contents of hook/function_hook.php, so there would be nothing left if I were to remove them both and, since this is supposed to be an automatic update package, I assume it's supposed to be there? 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.