New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when creating admin user in php 7 #9314

Closed
c-cesar opened this Issue Jan 22, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@c-cesar

c-cesar commented Jan 22, 2016

The installer sets up the database, but crashes when landing the page to create admin user. The error message says:

TypeError: Argument 4 passed to Elgg\\PersistentLoginService::__construct() must be of the type array, null given, called in /srv/http/e/vendor/elgg/elgg/engine/classes/Elgg/Di/ServiceProvider.php on line 195 and defined in /srv/http/e/vendor/elgg/elgg/engine/classes/Elgg/PersistentLoginService.php:38

The called function is:

$this->setFactory('persistentLogin', function(ServiceProvider $c) {
    $global_cookies_config = $c->config->get('cookies');
    $cookie_config = $global_cookies_config['remember_me'];
    $cookie_name = $cookie_config['name'];
    $cookie_token = $c->request->cookies->get($cookie_name, '');
    return new \Elgg\PersistentLoginService(
        $c->db, $c->session, $c->crypto, $cookie_config, $cookie_token);
});

So, the problem 4th argument, $cookie_config, is null.Maybe the problem is in $c->config->get('cookies'), but I don't know.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 24, 2016

Member

Can you try installing with this change? #9315

Member

mrclay commented Jan 24, 2016

Can you try installing with this change? #9315

@c-cesar

This comment has been minimized.

Show comment
Hide comment
@c-cesar

c-cesar Jan 25, 2016

Fixed for me. The installation finishes and I don't get errors or warnings.
Thanks.

c-cesar commented Jan 25, 2016

Fixed for me. The installation finishes and I don't get errors or warnings.
Thanks.

@juho-jaakkola

This comment has been minimized.

Show comment
Hide comment
@juho-jaakkola

juho-jaakkola Jan 26, 2016

Member

Thanks for reporting the bug!

It's great that you're testing Elgg on PHP 7, so Elgg will be ready for it once it becomes more widely used.

Member

juho-jaakkola commented Jan 26, 2016

Thanks for reporting the bug!

It's great that you're testing Elgg on PHP 7, so Elgg will be ready for it once it becomes more widely used.

@mrclay mrclay closed this in 4d79627 Feb 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment