You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: count(): Parameter must be an array or an object that implements Countable in ...\Dev\public_html\dolibarr-develop\htdocs\core\modules\supplier_payment\doc\pdf_standard.modules.php on line 213
Fatal error: Uncaught InvalidArgumentException: Parameter 1 $thirdparty is not a Societe nor Contact in ...\Dev\public_html\dolibarr-develop\htdocs\core\lib\pdf.lib.php:333
Stack trace:
#0 ...\Dev\public_html\dolibarr-develop\htdocs\core\modules\supplier_payment\doc\pdf_standard.modules.php(713): pdfBuildThirdpartyName(NULL, Object(Translate)) #1 ...\Dev\public_html\dolibarr-develop\htdocs\core\modules\supplier_payment\doc\pdf_standard.modules.php(253): pdf_standard->_pagehead(Object(TCPDI), Object(PaiementFourn), 1, Object(Translate)) #2 ...\Dev\public_html\dolibarr-develop\htdocs\admin\supplier_payment.php(129): pdf_standard->write_file(Object(PaiementFourn), Object(Translate)) #3 {main} thrown in ...\Dev\public_html\dolibarr-develop\htdocs\core\lib\pdf.lib.php on line 333
Steps to reproduce the behavior
New install: only modules enabled, no customers or products.
Modules/Application setup->Suppliers->Suppliers Payments
Payment Documents Models
Click on Preview link to trigger error.
Note that the Preview link on other modules works as expected.
The text was updated successfully, but these errors were encountered:
PHP now throws a warning when counting non countable types (the return values are still the same to prevent at least functional compatibility). I see two possible solutions:
But there are also some cases where scalar types or null is tried to count. This case needs to be fetched before the count operation wil be applied. (See case 2.)
2.) Check before every count() operation if the operand is countable. With the coming PHP 7.3 version, there will a function be implemented, which helps to solve this problem, see https://wiki.php.net/rfc/is-countable
Bug
Error on pdf preview for Suppliers Payments
Environment
Expected and actual behavior
No preview, only error:
Steps to reproduce the behavior
New install: only modules enabled, no customers or products.
Modules/Application setup->Suppliers->Suppliers Payments
Payment Documents Models
Click on Preview link to trigger error.
Note that the Preview link on other modules works as expected.
The text was updated successfully, but these errors were encountered: