Problem Description:
ImageDrawText throws an error when attempting to parse certain "Size" values into an integer.
See this thread for further details
https://stackoverflow.com/a/56894469/8895292
Steps to Reproduce:
<cfscript>
// 2016,0,11,314546
writeDump( server.coldfusion );
newImg = imageNew("", 100, 100);
setup['size'] = javacast("int", 123);
imageDrawText(newImg, "some text", 10, 10, setup);
</cfscript>
Actual Result:
java.lang.Integer cannot be cast to java.lang.String
Type: java.lang.ClassCastException
Expected Result:
Function call should succeed without error
Any Workarounds:
Manually convert the "size" value to an integer, and then cast it as a string:
setup['size'] = toString(floor(theInputValue))
Attachments:
Comments: