non-numeric value in media-cls.php line 631
-
Debug.log repeatedly showed warnings because of non-numeric values that occurred in line 631:
$ori_width = intval( $ori_width * $attrs[ 'height' ] / $ori_height );
I recommend the following modification in order not to read just the result of the calculation as integer, but each var as integer:
$ori_width = intval( $ori_width ) * intval( $attrs[ 'height' ] ) / intval( $ori_height );
In my case that modification had the warning vanish. As there are more and similar calcs in that script the same change might apply to them as well. It seems that $attrs[ ‘height’ ] provided a string which caused the warning before the intval comprising the complete math term came to effect.
best regards,
SvenThe page I need help with: [log in to see the link]
- The topic ‘non-numeric value in media-cls.php line 631’ is closed to new replies.