The documentation for theme_datatable() says that the $variables array contains an element 'datatable_options'. In fact the code looks for that element in the 'attributes' array.
I'm trying to work around the problem that datatables gives the javascript error
Requested unknown parameter '1' from the data source for row 0"
when your table has the 'empty' option by writing
return theme(count($list) ? 'datatable' : 'table', $table);
but that's not working because the datatable_options array shows up in the table attributes.
Comments
Comment #1
dqdWe are on 7.x 2.x so I would say this issue can be closed for now and reopened with changed code version option if somebody wants to report it for 2.x.