Im working on a project and try to get the last element of a DataList:
If the list is empty, I get the following error:
[User Error] Uncaught InvalidArgumentException: SQLQuery::setLimit() only takes positive values
I have attached an image with the full output.
Is it possible that this is a bug or do I realy have to check if the list is empty before i call last()?