imagify-plugin icon indicating copy to clipboard operation
imagify-plugin copied to clipboard

PHP Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated when click what plan do I need

Open Mai-Saad opened this issue 1 year ago • 1 comments
trafficstars

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version => 2.2.2
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug When click what plan do I need on imagify green banner 2.2.2 or upgrade link in admin bar at 2.2.3 we have deprecated notice in debug.log

To Reproduce Steps to reproduce the behavior:

  1. Fresh install/activate of 2.2.2 for starter account with balance >20%
  2. Click on What plan do I need in green banner
  3. check debug.log
[16-Oct-2024 13:17:11 UTC] PHP Deprecated:  round(): Passing null to parameter #1 ($num) of type int|float is deprecated in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/imagify/inc/classes/class-imagify-files-stats.php on line 408
[16-Oct-2024 13:17:11 UTC] PHP Deprecated:  round(): Passing null to parameter #1 ($num) of type int|float is deprecated in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/imagify/inc/classes/class-imagify-files-stats.php on line 438

Expected behavior No deprecated notice

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

  • same will occur on 2.2.3 if we click the upgrade link in admin bar or green banner Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming

Mai-Saad avatar Oct 16 '24 13:10 Mai-Saad

I fixed this in this PR, check this commit https://github.com/wp-media/imagify-plugin/pull/935/commits/079a2f43648e82e325a124504abb642958e5af1f. We can close this ticket. cc @Mai-Saad

Khadreal avatar Dec 21 '24 00:12 Khadreal