Using $this when not in object context

Issue #1 resolved
Braunson created an issue

When trying to login via http://www.mysite.com/laravel/public/anvard/login/Facebook I receive this error:

File: /laravel/vendor/atticmedia/anvard/src/Atticmedia/Anvard/routes.php

if (Config::get('anvard::routes.login')) {
    Route::get(
        Config::get('anvard::routes.login'),
        array(
            'as' => 'anvard.routes.login',
            function($provider) {
                Log::debug('Anvard: attempting login');
                $profile = $this->app['anvard']->attemptAuthentication($provider, $this->app['hybridauth']);
                Log::debug('Anvard: login attempt complete');
                if ($profile) {

Any ideas? I also had to manually create and move over the migration in the vendors file to the /app folder and run the migration as nothing ran after install/update.

Any suggestions are appreciated. Running L4 on PHP 5.4

Comments (9)

  1. Pete Otaqui
    • changed status to open

    Actually sorry, I misunderstood.

    I'm not getting this particular error. Which version of laravel are you using? If you look in composer.lock you should get an absolute commit reference

  2. Pete Otaqui

    Sorry I can't replicate this in my environment.

    I'll try again with a clean setup, going to take me a couple of days as I'm travelling.

  3. Braunson reporter

    Maybe this information will be helpful to what I have installed. It's a fresh install on a VPS, PHP 5.4, Laravel 4, only a few others bundles/packages included. Composer is up to date as well.

    Here's my composer.json file -- I hope it may be helpful.

    {
        "require": {
            "laravel/framework": "4.0.*",
            "way/generators": "dev-master",
            "jasonlewis/expressive-date": "dev-master",
            "atticmedia/anvard": "dev-master"
        },
        "autoload": {
            "classmap": [
                "app/commands",
                "app/controllers",
                "app/models",
                "app/database/migrations",
                "app/database/seeds",
                "app/tests/TestCase.php"
            ]
        },
        "minimum-stability": "dev"
    }
    
  4. Braunson reporter

    I just cloned a clean copy of Laravel 4.0.0, added atticmedia/anvard as a requirement in composer.json, tried going to mysite.com/anvard/login/facebook and it returned the same $this error, nothing else has changed?

    Also while following guide; on step 7, there was nothing to migrate?

  5. Braunson reporter

    Seems the first time I had an issue with it running PHP 5.4, but the second time around on another server, it was returning false readings of PHP 5.4 when it was actually running PHP 5.3 -- After composer update and making sure the server was running 5.4 there was no further issues. Consider this issue closed.

  6. Log in to comment