• Resolved matt_fw

    (@matt_fw)


    Most of Tiny_Plugin::compress_*() methods call Tiny_Image::compress() incorrectly – the compress() method doesn’t take Tiny_Settings as a parameter. Sample code from Tiny_Plugin::compress_image_for_bulk():

    
    $tiny_image = new Tiny_Image( $this->settings, $id, $metadata );
    $result = $tiny_image->compress( $this->settings );
    
    • This topic was modified 3 years, 2 months ago by matt_fw.
Viewing 1 replies (of 1 total)
  • Plugin Author TinyPNG

    (@tinypng)

    Hi Matt,

    Thanks for the feedback!

    You’re right. There is no need to pass along the settings in these compress calls. PHP doesn’t throw any errors when you call a function with too many arguments, so that’s probably why it’s still in there. In case you notice anything else, feel free to submit a PR 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Incorrect call to Tiny_Image::compress() from Tiny_Plugin’ is closed to new replies.