Protection when calling _ssp_field for sorting
Protection when calling _ssp_field for sorting
Dear all,
When calling _ssp_field, it is necessary to test if the column is searchable or not, or orderable or not, to avoid potential error.
A protection is done in _ssp_filter with the following test:
if ( $http['columns'][$i]['searchable'] == 'true' ) {
in _ssp_sort it is necessary to apply the same kind of protection for orderable
=> I suggest you add in Editor\Editor.php in the method _ssp_sort:
if ( $http['columns'][$order['column']]['orderable'] == 'true' ) {
before calling $query->order( ... _ssp_field ... )
Regards,
Gilles
Answers
Good point - thanks! I'll get the demo script updated.
Allan