I use for my daily bills. This used to work fine, but now I use InvoicePlane version 1.6.1 and when creating a PDF file I get the following message
Fatal error: Declaration of Mpdf\PsrHttpMessageShim\Request::withRequestTarget(string $requestTarget): Psr\Http\Message \RequestInterface
must be compatible with PsrExt\Http\Message\RequestInterface::withRequestTarget($requestTarget)
in /path/to/public_html/vendor/mpdf/psr-http-message-shim/src/ Request.php on line 88
I’m not very good with PHP, but does anyone know what’s going wrong here?
1 Like
Which PHP version do you have on your system?
I’vr edited some paths in your post, they give too much information to thr outside world
Version 8.1 and it runs on a reseller package on a subdomain
1 Like
Open public_html/vendor/mpdf/psr-http-message-shim/src/Request.php
and go to line 88
It says: withRequestTarget(string $requestTarget): Psr\Http\Message\RequestInterface
and it should say:
withRequestTarget(string $requestTarget)
So you should remove that last bit.
Remove: :Psr\Http\Message\RequestInterface
(Including the :
)
On line 88 it says this: public function withRequestTarget(string $requestTarget): RequestInterface that does not match what it should be.
So: make it public function withRequestTarget(string $requestTarget)
2 options:
- fool around in that
vendor
directory
- download the .zip file and re-upload the
vendor
directory