Announcement

Collapse
No announcement yet.

Reports to XLSX fail with php8

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reports to XLSX fail with php8

    When using PHP8 the export to XLSX in reports is not working.

    I am using EspoCRM 6.1.2 and Advanced Pack 2.6.6.

    Logs show the following:

    [2021-02-10 09:08:08] ERROR: Slim Application Error Type: TypeError Code: 0 Message: Unsupported operand types: string * int File: /home/admin/domains/*domain*/private_html/wrs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php Line: 312 Trace: #0 /home/admin/domains/*domain*/private_html/wrs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php(252): PhpOffice\PhpSpreadsheet\Shared\Date::formattedPHP ToExcel() #1 /home/admin/domains/*domain*/private_html/wrs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php(269): PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToEx cel() #2 /home/admin/domains/*domain*/private_html/wrs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php(229): PhpOffice\PhpSpreadsheet\Shared\Date::timestampToE xcel() #3 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Tools/Export/Formats/Xlsx.php(436): PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel() #4 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Tools/Export/Export.php(323): Espo\Tools\Export\Formats\Xlsx->process() #5 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Services/Record.php(2185): Espo\Tools\Export\Export->run() #6 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Services/Record.php(2172): Espo\Services\Record->export() #7 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Modules/Advanced/Services/Report.php(4088): Espo\Services\Record->exportCollection() #8 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Modules/Advanced/Controllers/Report.php(240): Espo\Modules\Advanced\Services\Report->exportList() #9 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/ControllerManager.php(106): Espo\Modules\Advanced\Controllers\Report->postActionExportList() #10 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/Api/RouteProcessor.php(84): Espo\Core\ControllerManager->process() #11 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/ApplicationRunners/Api.php(184): Espo\Core\Api\RouteProcessor->process() #12 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/ApplicationRunners/Api.php(112): Espo\Core\ApplicationRunners\Api->processRequest() #13 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Espo\Core\ApplicationRunners\Api->Espo\Core\ApplicationRunners\{closure}() #14 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Routing/Route.php(381): Slim\Handlers\Strategies\RequestResponse->__invoke() #15 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle() #16 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle() #17 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle() #18 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run() #19 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(60): Slim\Routing\RouteRunner->handle() #20 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\RoutingMiddleware->process() #21 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #22 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\ErrorMiddleware->process() #23 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #24 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle() #25 /home/admin/domains/*domain*/private_html/wrs/vendor/slim/slim/Slim/App.php(199): Slim\App->handle() #26 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/ApplicationRunners/Api.php(94): Slim\App->run() #27 /home/admin/domains/*domain*/private_html/wrs/application/Espo/Core/Application.php(95): Espo\Core\ApplicationRunners\Api->run() #28 /home/admin/domains/*domain*/private_html/wrs/api/v1/index.php(37): Espo\Core\Application->run() #29 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor. [] []

    When switching back to 7.4 it works again, but i did notice this in the logs:

    [2021-02-10 09:13:42] WARNING: E_WARNING: A non-numeric value encountered {"code":2,"message":"A non-numeric value encountered","file":"/home/admin/domains/*domain*/private_html/wrs/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php","line":312} []
Working...
X