![]() |
|
One shot Warning from an archive page - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: One shot Warning from an archive page (/thread-10308.html) |
One shot Warning from an archive page - Mark R - 2012-08-18 Notice: Undefined variable: weights in /home/pjroth/public_html/sowearedads.com/zp-core/class-search.php on line 1436 I don't think this is a user that any user without admin privileges would ever see but I'll mention it anyhow. I think it is probably because all my albums and photos are unpublished. This line in class-search.php is trying to pull info from $weights[]. The actual line is, $images[] = array('filename' => $row['filename'], 'folder' => $albumrow['folder'], 'weight'=>$weights[$row['id']]); ` EDIT: I forgot to mention that the warning line is printed once for each item in the archive item. So when I have May(14) I will have 14 lines of warnings. Also, I understand I am only seeing this because I currently have a debug build. One shot Warning from an archive page - Mark R - 2012-08-18 Actually I was wrong. For some reason the warning output doesn't occur every time. It does still happen. I'm guessing a check would take care of the problem. One shot Warning from an archive page - sbillard - 2012-08-18 Maybe you can figure out the differences between when you get the error and when not. Basically, the weights array element should be present as that is how we sort the search results for relevance. One shot Warning from an archive page - Mark R - 2012-08-19 Sure thing. It is pretty minor and easy enough to test. I'll let you know. |