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
https://forums.phpfreaks.com/topic/284691-fatal-error-help-needed/
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.

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? 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.