• When uploading Media files (in my case PDF, PNG, HTM and JPG) via the WP REST-API I got a PHP Warning “Undefined Index: file in resmushit.php:114”. The corresponding PHP line is

    $basefile = basename($attachments[ 'file' ]);

    Turning off auto-optimization resolved the error (as resmushit is not executed anymore automatically on upload).

Viewing 1 replies (of 1 total)
  • Plugin Contributor reSmush.it

    (@resmushit)

    Hi @davidfuhr,

    Sorry for this late reply.
    Thanks for this interesting feedback. It’s normal that this function should be called, but the attachment array you should be empty. Can you provide us lines of code you’ve used, to reproduce your problem?

    Cheers,
    Charles

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Warning when uploading via WP API’ is closed to new replies.