andrydesign Posted October 8, 2013 Share Posted October 8, 2013 Здравствуйте, помогите решить проблему. При нажатии на кнопку "Просмотр счета" в заказах, не создается PDF файл, выдает ошибку: Warning: Division by zero in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 22977 Warning: array_fill(): Number of elements must be positive in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 22979 Warning: Invalid argument supplied for foreach() in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 24388 Warning: Invalid argument supplied for foreach() in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 24420 Warning: Invalid argument supplied for foreach() in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 24388 Warning: Invalid argument supplied for foreach() in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 24420 Warning: Cannot modify header information - headers already sent by (output started at /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php:22977) in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 8961 TCPDF ERROR: Some data has already been output to browser, can't send PDF file Link to comment Share on other sites More sharing options...
tuk66 Posted October 8, 2013 Share Posted October 8, 2013 Какова ваша версия PrestaShop и что изменилось и, возможно, вызвана эта ошибка (модуль, патч)? What is your PrestaShop version and what is changed and possibly caused this error (module, patch)? Link to comment Share on other sites More sharing options...
absent Posted October 8, 2013 Share Posted October 8, 2013 (edited) если отключишь ошибки заработает, а так у тебя деление на 0 + нет переменной для foreach. Edited October 8, 2013 by absent (see edit history) Link to comment Share on other sites More sharing options...
andrydesign Posted October 8, 2013 Author Share Posted October 8, 2013 Какова ваша версия PrestaShop и что изменилось и, возможно, вызвана эта ошибка (модуль, патч)? What is your PrestaShop version and what is changed and possibly caused this error (module, patch)? Версия 1.5.3.1 дополнительных модулей не устанавливал, ошибка появилась после переноса на другой хостинг. если отключишь ошибки заработает, а так у тебя деление на 0 + нет переменной для foreach. Подскажите как отключить ошибки. Link to comment Share on other sites More sharing options...
absent Posted October 8, 2013 Share Posted October 8, 2013 Версия 1.5.3.1 дополнительных модулей не устанавливал, ошибка появилась после переноса на другой хостинг. Подскажите как отключить ошибки. defines.inc.php ~28 строка define('_PS_MODE_DEV_', false); а вообще надо найти корень зла Link to comment Share on other sites More sharing options...
tuk66 Posted October 8, 2013 Share Posted October 8, 2013 Warning: Division by zero in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 22977 Warning: array_fill(): Number of elements must be positive in /sata1/home/users/crossroud/www/www.spas-icona.com/tools/tcpdf/tcpdf.php on line 22979...... It looks like the problem is with a table without columns in the invoice. Code at these lines is: $table_min_column_width = ($table_columns_width / $dom[$key]['cols']); ... $table_colwidths = array_fill(0, $dom[$key]['cols'], $table_min_column_width); I suggest to check if all files was successfully copied. Especially /pdf/*.tpl files. Sorry for English. Link to comment Share on other sites More sharing options...
andrydesign Posted October 9, 2013 Author Share Posted October 9, 2013 Спасибо всем большое за помошь! Помог совет "если отключишь ошибки заработает..." Изменил в файле "defines.inc.php" значение true на false - define('_PS_MODE_DEV_', false); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now