tinify / wordpress-plugin

Speed up your WordPress website. Optimize your JPEG and PNG images automatically with TinyPNG.
GNU General Public License v2.0
88 stars 36 forks source link

Function create_function() is deprecated since PHP 7.2; Use an anonymous function instead #17

Closed wormeyman closed 4 years ago

wormeyman commented 6 years ago

https://github.com/tinify/wordpress-plugin/blob/fdb99db6f7acc8ec28a9cb8768e2d689ad56d437/src/class-tiny-notices.php#L134

I am getting my site ready for 7.2 because of the performance benefits and I noticed that tiny png was throwing an error running wp phpcompat 7.2

rolftimmermans commented 6 years ago

Thanks for the report. We will have a look how we can gracefully replace this to avoid warning. AFAIK create_function is used for compatibility with PHP 5.2 which is still in widespread use.

I will leave this open for the moment.

Brugman commented 4 years ago

Looks like this got fixed in 3.0.1.