Skip to content
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

Disabled sorting causes invalid index error #132

Closed
nesl247 opened this issue Aug 7, 2014 · 4 comments
Closed

Disabled sorting causes invalid index error #132

nesl247 opened this issue Aug 7, 2014 · 4 comments

Comments

@nesl247
Copy link
Contributor

nesl247 commented Aug 7, 2014

In DataTables, if you disable sort via sort: false, errors appear because this package is currently assuming that $this->input['order'] exists.

@nesl247
Copy link
Contributor Author

nesl247 commented Aug 7, 2014

The fix is to change if(count($this->input['order'])>0) to if(array_key_exists('order', $this->input) && count($this->input['order'])>0) on line 448.

@ktunkiewicz
Copy link

Fixed with #133 fix

@vplanas
Copy link

vplanas commented Sep 4, 2014

Hi!
Great work here! But I think it's not fixed yet. If ordering is set to false the error still appears:

error: {type:ErrorException, message:Undefined index: order,…}
file: ".../vendor/bllim/datatables/src/Bllim/Datatables/Datatables.php"
line: 498
message: "Undefined index: order"
type: "ErrorException"

The fix proposed by @nesl247 is working

@ktunkiewicz
Copy link

OK, i didn't notice that nesl247 is writing about different line than in #133... Merged that change too.

New release with this fix is out now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants