1

Currently using EE 2.7.3 and Freemember 2.3.1. I made sure to create an encryption key first for my config file. I've followed the documentation so far, it's thorough and keeps things minimal. Unfortunately, immediately after calling Freemember I'm being given this error:

Parse error: syntax error, unexpected ':' in /home/.../system/expressionengine/third_party/freemember/mod.freemember.php on line 397

This is line 397 of mod.freemember.php:

$return_url = ee()->input->get_post('return_url') ?: $this->history(0);

And here is my login markup:

{if logged_out}
    <a href="#" class="login">Login</a>
    <div id="login-modal">
            {exp:freemember:login return="PREVIOUS_URL"}
                <input type="text" name="username" value="" maxlength="32" placeholder="Username">
                <input type="password" name="password" value="" maxlength="32" placeholder="Password" autocomplete="false">
                <input type="submit" name="submit" value="Submit">
                {if auto_login}
                    <p><input type="checkbox" name="auto_login" value="1" {auto_login_checked} > Auto-login on future visits</p>
                {/if}
                <a href="{path='member/forgot_password'}">Forgot your password?</a>
            {/exp:freemember:login}
    </div>
{/if}
{if logged_in}
    <a class="login" href="{exp:freemember:logout_url}">Logout</a>
{/if}

div#login-modal is being toggled with JQuery (1.10.4)

What is causing this? My guess is I've overlooked something but I'm out of ideas.

EDIT: Trying to isolate the issue, any hint of Freemember tags on the page will return an error.

1 Answer 1

2

That syntax you pointed out on line 397 is PHP 5.3 only. You are likely on an older version of PHP.

1
  • 1
    Good point. I don't think FreeMember intentionally required PHP 5.3+, but I've just added it as a requirement in the readme. Commented Feb 19, 2014 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.