Products

Products
Viewing By Entry / Main
November 25, 2007

Can't load a null.

Coldfusion error - "Can't load a null."

The error for my particular situation was caused by trying to pass a param into a function within a cfm file, it doesn't work this way.

The error: catch.cfm (a custom tag) *condensed*

<cfparam name="Attributes.file" default="log.log"/>
<cfparam name="maxFileSize" default="500"/>

<cffunction name="fileSizeCheck" access="public" returntype="void">
   <cfargument name="file" type="string" required="no" default=""/>
   <cfargument name="maxFileSize" type="numeric" required="no" default="#maxFileSize#"/>
</cffunction>

The error in the above code was trying to use #maxFileSize# as a default value for a cfargument. I changed it to the actual value '500' and it worked.

Comments

There are no comments for this entry.


Copyright © 2005-2006 Clint Willard. All rights reserved.
Aura skin for Clint Willard's BlogCFC inspired by Brooks Bilson's Bolg.
All trademarks property of their owners.