ilovepdf / ilovepdf-php

iLovePDF Rest Api - PHP Library (https://developer.ilovepdf.com)
150 stars 41 forks source link

Undefined index: Content-Disposition #56

Open mdawart opened 2 months ago

mdawart commented 2 months ago

I think this is the same as in https://github.com/ilovepdf/ilovepdf-php/issues/46 and I posted it as a comment there earlier, but I assume this is unwatched - so I add a new issue for this:

  "exception" => ErrorException {
    #message: "Notice: Undefined index: Content-Disposition"
    #code: 0
    #file: "./vendor/ilovepdf/ilovepdf-php/src/Task.php"
    #line: 295
    #severity: E_NOTICE
    trace: {
      ./vendor/ilovepdf/ilovepdf-php/src/Task.php:295 { …}
      ./vendor/ilovepdf/ilovepdf-php/src/Task.php:235 { …}
      ./src/Service/ILovePdfHandler.php:39 {
        App\Service\ILovePdfHandler::compress(Email $email): array^
        › mkdir($compressedPath);
        › $myTaskCompress->download($path . 'compressed/');
        › EmailHandler::unpackFile('output.zip', $compressedPath);
      }

(we are using an older version of the library)

Melfith commented 1 week ago

This issue has been fixed in the later version. Your error is certainly due to a response with "content-disposition" within the header instead of "Content-Disposition".