ingeniasoftware / luthier-ci

Improved routing, middleware support, authentication tools and more for CodeIgniter 3 framework
https://luthier.ingenia.me/ci/en/
MIT License
150 stars 38 forks source link

One more quick small bug :) #35

Closed Ihabafia closed 5 years ago

Ihabafia commented 5 years ago

In Route::buildurl()

I added the following code:

if(is_object($params))
    $params = (array) $params;

The reason why I did this, some times you sent the class as an object, so to catch code it is like:

$user->id
$user->code

while the application catch it as:

$user['id']
$user['code']

So to make sure that the class is going to be transferred as an array and not object I made this extra modification if you will.

Thank you,