Image Watermark plugin constantly erroring, but seems to work
I am utilizing the image watermarking function on two websites, in which there is a lot of errors going into the developer log. For both sites the CMSB version is currently v3.57 (Build 2312) [ and not wanting to update for a while longer ]. The watermark plugin is version 1.01.
Here's the type of error being produced:
"E_DEPRECATED: Implicit conversion from float 28.5 to int loses precision" and the only differences b/n the errors is the float number (usually from 25.5 to 28.5).
So, what is happening here?
Looks like the plugin's probably doing some resizing work, either on the image or the watermark. In the process, it's likely performing calculations that result in floating-point numbers—think numbers with decimals like 310.6 pixels for a new width. What happens next is that this number gets truncated to an integer, essentially dropping the decimal and giving us a whole number like 310 pixels.
You're seeing that "loss of precision" warning because newer PHP versions flag this as something you might wanna be aware of. It's PHP's way of saying, "Hey, you're losing some data here."
The good news? You can safely ignore this warning. If you want to mute it, just add an '@' in front of the PHP function that's causing it.
Let me know if that clears things up or if you have more questions.