When accessing the dashboard on my server, I noticed that many times I was getting the following errors on my server log:
PHP Notice: Undefined offset: 6 in /var/www/ysf/include/functions.php on line 98
PHP Notice: Undefined offset: 6 in /var/www/ysf/include/functions.php on line 108
I noticed you just used the count() function to get the values for the loop, making the array go out of bounds, as the array counts from 0 to total-1 and the count() function was returning the total.
The propsed fix uses count()-1 instead of count() and fixed the problem in my environment.
When accessing the dashboard on my server, I noticed that many times I was getting the following errors on my server log:
I noticed you just used the count() function to get the values for the loop, making the array go out of bounds, as the array counts from 0 to total-1 and the count() function was returning the total.
The propsed fix uses count()-1 instead of count() and fixed the problem in my environment.