Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Possible Bug: Division by zero in class-asp-searchoverride.php
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 3 months ago.
- AuthorPosts
- December 28, 2017 at 4:23 pm #16069
Dear support team,
It seems that there is a possible bug in the class-asp-searchoverride.php file:
While typing some search phrases (but not all of them), I’ve got an error in my WAMP (localhost dev) the following:
Division by zero in C:\wamp64\www\iglazer\wp-content\plugins\ajax-search-pro\includes\classes\filters\class-asp-searchoverride.php in line 91.It is important to mentioned that I am using two searches. they are one on top of the other. a javascript a swiching the visibilty between them, and as they look the same – it is unnoticeable.
As a current workaround, i’ve modified the mentioned file, and added this line:
$posts_per_page = $posts_per_page == 0 ? 1 : $posts_per_page;I would be happy to get a proper fix.
Regards,
Yaniv.Attachments:
You must be logged in to view attached files.December 29, 2017 at 10:21 am #16080Hi,
Thank you for letting us know.
I’m not sure if this is a potential bug, as it may come from an incorrectly set option on the back-end. Can you please check if this option is not set to 0 on your back-end: https://i.imgur.com/dO9ayeU.png
Best,
..as well as the posts per page under the WordPress -> Reading settings is not set to 0 either: https://i.imgur.com/dOSJgaC.png
If those are above 0, it should be fine. Nevertheless, I will add an additional check for zero division in the upcoming release, just to be sure.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 31, 2017 at 3:32 pm #16102Hello,
Thank you so much for your quick response.
You were correct. the problem seems to be related to the fact that ‘Result count per page’ was empty.
By setting the correct integer value, problem is resolved.Once again,
Thank you!
Best,
Yaniv.January 2, 2018 at 10:49 am #16108You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Possible Bug: Division by zero in class-asp-searchoverride.php’ is closed to new replies.