Getting this exact error on my dev server though its on line 179 instead of 176. The code is the same as pennylessz28 posted though. It seems to be a result of having one of my categories excluded from the new and random images sections on my index. If I turn off that option the error goes away. Problem is I need that option to work. Any ideas on how to get it working without the error?