Jump to content
Sign in to follow this  
Se0M

Ошибка Warning: Division by zero in

Recommended Posts

Ошибка в блоке новостей.Прошу помочь в исправлении так как я новичок не могу найти решения.

Warning: Division by zero in /var/www/vhosts/xn----8sbnnhd0afdgjdar8m.kz/express-optica.kz/catalog/controller/information/news.php on line 215

Share this post


Link to post
Share on other sites
Только что, Se0M сказал:

Ошибка в блоке новостей.Прошу помочь в исправлении так как я новичок не могу найти решения.

Warning: Division by zero in /var/www/vhosts/xn----8sbnnhd0afdgjdar8m.kz/express-optica.kz/catalog/controller/information/news.php on line 215

вопрос что вы там на ноль делите в строке 215?

Share this post


Link to post
Share on other sites

$data['pagination'] = $pagination->render();

 

$data['results'] = sprintf($this->language->get('text_pagination'), ($news_total) ? (($page - 1) * $limit) + 1 : 10, ((($page - 1) * $limit) > ($news_total - $limit)) ? $news_total : ((($page - 1) * $limit) + $limit), $news_total, ceil($news_total / $limit));

Share this post


Link to post
Share on other sites

У вас наверное кол-во новостей стоит 0

Share this post


Link to post
Share on other sites
3 минуты назад, Se0M сказал:

$data['pagination'] = $pagination->render();

 

$data['results'] = sprintf($this->language->get('text_pagination'), ($news_total) ? (($page - 1) * $limit) + 1 : 10, ((($page - 1) * $limit) > ($news_total - $limit)) ? $news_total : ((($page - 1) * $limit) + $limit), $news_total, ceil($news_total / $limit));


Это кто такое придумал блин???:-x

Share this post


Link to post
Share on other sites
7 минут назад, Jozzeff сказал:


Это кто такое придумал блин???:-x

Не знаю. Как можно исправить ?

Share this post


Link to post
Share on other sites
25 минут назад, Jozzeff сказал:

У вас наверное кол-во новостей стоит 0

Тли возможно вытащили limit не из той строки конфига

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.