Chumper / Datatable

This is a laravel 4 package for the server and client side of datatables at http://datatables.net/
https://github.com/Chumper/Datatable
388 stars 154 forks source link

"Illegal offset type" when testing forked repo with dev-master #302

Closed rossanthony closed 9 years ago

rossanthony commented 9 years ago
file: "/var/www/html/vendor/chumper/datatable/src/Chumper/Datatable/Engines/CollectionEngine.php"
line: 261
message: "Illegal offset type"
type: "ErrorException"
timgws commented 9 years ago

Hey @rossanthony, I saw this a couple of days ago and am currently trying to get the suite to run correctly.

I am trying to mock Laravel's Config class, but I can't seem to be able to swap the Facade class out:

    $config = Mockery::mock('ConfigMock');
    $config->shouldReceive('get')->zeroOrMoreTimes()->with("datatable::engine")->andReturn(
        array(
            'exactWordSearch' => false,
        )
    );

    Illuminate\Support\Facades\Config::swap($config);
ErichNiem commented 9 years ago

Hi

I do not know what you guys are talking about, but I just did a composer update and I am getting this same offset error with all the tables I created previously

Exact error is:
{"error":{"type":"ErrorException","message":"Illegal offset type","file":"C:\wamp\www\laravel\in2assets\vendor\chumper\datatable\src\Chumper\Datatable\Engines\CollectionEngine.php","line":261}}

timgws commented 9 years ago

@ErichNiem what was the last time you updated that worked?

Could both of you check out this change:

https://github.com/timgws/Datatable/commit/ed4617799f22cf974d8973668df29c794090347b

and see if it fixes the problem(s) for you?

ErichNiem commented 9 years ago

@timgws I haven't updated for a while, the last version I had was 1.9 I will try your fix and get back to you

ErichNiem commented 9 years ago

@timgws

Yes is working fine now

Thank you

timgws commented 9 years ago

@ErichNiem thanks for checking that out. @Chumper should merge this soon!

timgws commented 9 years ago

:+1: @ErichNiem @rossanthony, could you please try running composer update Chumper/Datatable and see if that fixes your problems?

ErichNiem commented 9 years ago

@timgws Sorry to take so long, composer update done. All Good!!