Uploaded image for project: 'Lucee Development'
  1. LDEV-684

CFARGUMENT Can't cast String [] to a boolean

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 4.5.3.001
    • Fix Version/s: 5.0.0.161, 4.5.3.003
    • Labels:

      Description

      FROM https://issues.jboss.org/browse/RAILO-2313

      It used to be possible to simply write "required" and have the attribute be set to true.
      It is now being set to an empty string, which is invalid for a boolean value.
      Example code:

      <cffunction name="add">
      	<cfargument name="arg1" type="Numeric" required />
      	<cfargument name="arg2" type="Numeric" required />
       
      	<cfreturn arg1 + arg2 />
      </cffunction>
       
      <cfdump eval=add(1,1) />
      

      This used to work fine, but now throws the error "Can't cast String [] to a boolean".
      This is probably as a result of the RAILO-2263 change - however, that change should only affect custom attributes, and specifically should not set an empty string for built-in boolean attributes.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                zac.spitzer Zac Spitzer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: