sortByFilenameAscending() Throws error

Permalink
Hello,
I hope I’m in the correct forum for this question. I’m using the Simple Gallery block and it does not sort by file name so I tried editing its controller.php by adding $filelist->sortByFilenameAscending(); in the getImages($filesetID) function just below $filelist->filterBySet($fileset); it throws an error when I do that. Am I missing something. How can I get the block to display the images in file name order? Thanks

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,

What is the error?
baxterdmutt replied on at Permalink Reply
I've clipped out my site name but this is the error:

Exception Occurred: /home/admin/web/MYSITE.COM/public_html/packages/simple_gallery/blocks/simple_gallery/controller.php:275 Call to a member function sortByFilenameAscending() on null (1)
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Make sure you used $fileList with a capital L on "List" and not $filelist
baxterdmutt replied on at Permalink Reply
Oh My God!!! I need glasses!!! I looked at that so many times to make sure I had that all correct.
Thanks so much. It works wonderfully now!
mnakalay replied on at Permalink Reply
mnakalay
I know the feeling :b glad I could help