Closed
Description
setValue('nome', 'Igor Ogura Ramos');
$templateProcessor->saveAs("teste2.docx");
error:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, int given in C:\xampp\htdocs\brax\app\lib\vendor\phpoffice\phpword\src\PhpWord\Shared\ZipArchive.php:387 Stack trace: #0 C:\xampp\htdocs\brax\app\lib\vendor\phpoffice\phpword\src\PhpWord\Shared\ZipArchive.php(387): count(0) #1 [internal function]: PhpOffice\PhpWord\Shared\ZipArchive->pclzipLocateName('word/header1.xm...') #2 C:\xampp\htdocs\brax\app\lib\vendor\phpoffice\phpword\src\PhpWord\Shared\ZipArchive.php(115): call_user_func_array(Array, Array) #3 C:\xampp\htdocs\brax\app\lib\vendor\phpoffice\phpword\src\PhpWord\TemplateProcessor.php(119): PhpOffice\PhpWord\Shared\ZipArchive->__call('locateName', Array) #4 C:\xampp\htdocs\brax\app\index.php(8): PhpOffice\PhpWord\TemplateProcessor->__construct('teste.docx') #5 {main} thrown in C:\xampp\htdocs\brax\app\lib\vendor\phpoffice\phpword\src\PhpWord\Shared\ZipArchive.php on line 387
Help please
Metadata
Metadata
Assignees
Labels
No labels