Closed galbaras closed 3 years ago
I have a bunch of these fixed that I need to get into a pull request.
The root cause is that in several places in core the empty string ('') is used to initialize variables that will eventually hold integers or floats. In PHP 7.1 & 7.2 that will generate warnings.
Wholesale changing all of the initializations is not the best idea because some plugins or other functions might be comparing to empty string and taking a different course of action than if the value was 0.
How about explicitly casting to integer then?
@JustinSainton Any reason you've closed this issue?
I'm getting the above PHP warnings, and it looks like the
$in_weight
input isn't being validated before being used.My store actually has shipping disabled, so wpsc_convert_weight() can be skipped.