We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

when a comment does not post then notice received | Forum

dave Leader
dave Jul 24 '16

When i comment fails the variable throws a notice.  



Undefined index: countOnPage

File: /home/username/public_html/example.com/ow_system_plugins/base/bol/comment_service.php

Line: 442


probably need to be sure that if the count is 0 or array empty that the developers set countOnPage to 0 or handle it another way.  :) 



thanks 

The Forum post is edited by dave Jul 24 '16
ross Team
ross Jul 25 '16
Dave what do you mean a comment fails? under what conditions it fails? 
dave Leader
dave Jul 25 '16
There was an issue with a plugin which has been fixed. However in the process this issue with the null variable was discovered.  


The issue is not about the failing comment... The issue is that the countOnPage is not properly vetted so that if in the event it is empty it has someplace to go rather than show a notice.  This is something simple that can be fixed with something like 


if($countOnPage == 0)

{


//do something like show no records found or just do exception trap


}


it falls under the same rules and guidelines which plugin developers must follow for no notices. And every little tiny correction we can do helps the script.  


I hope that explains things better :)  


Thanks for listening 

The Forum post is edited by dave Jul 25 '16
Timothy Ferriss
Consider using a debugger to step MapQuest Route Planner through your code and inspect variable values at runtime.
The Forum post is edited by Timothy Ferriss Sep 20
Post Minder
Post Minder Oct 9
Là Fuori is a reflection of the love for travel, sustainability, and the finer things in life, gathering 'nomadic creatives' to uplift and preserve the traditions of artisans worldwide. La Fuori