Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use TemplateProcessor #2527

Open
anugrahjayaaaa opened this issue Dec 11, 2023 · 0 comments
Open

Can't use TemplateProcessor #2527

anugrahjayaaaa opened this issue Dec 11, 2023 · 0 comments

Comments

@anugrahjayaaaa
Copy link

Describe the Bug

2 years ago, I used this lib, and now I use this lib again, I'm following the steps from my previous project, but somehow I got an typeError from the parameter of TemplaterProcessor.

Steps to Reproduce

Please provide a code sample that reproduces the issue.

<?php
use PhpOffice\PhpWord\Settings;
use PhpOffice\PhpWord\TemplateProcessor;

Settings::setZipClass(Settings::PCLZIP);
$path = "uploads/test.docx";
var_dump($path);
$certif = new TemplateProcessor('uploads/test.docx');
return $certif;

Expected Behavior

TemplateProcessor can be used normally and open the correct docx file

Current Behavior

I get error
image
image

Context

Please fill in your environment information:

  • PHP Version:8.2.8
  • PHPWord Version:1.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant