Your code doesn't always return a value. If you fail the first cfif, you
don't return anything. You also fail to return anything in this block:
<cfelse>
<cfset
TempStr=ReReplaceNoCase(str, "<[^>]*>| ", "", "ALL")>
<cfif not len(trim(TempStr))>
<cfreturn TRUE>
</cfif> <---- Notice this cfif
- what if it is false?
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
WWW : www.camdenfamily.com/morpheus
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Brook Davies [mailto:brook@;maracasmedia.com]
> Sent: Wednesday, October 23, 2002 5:15 PM
> To: CF-Talk
> Subject: RE: UDF and Null Errors?
>
>
> Sometimes my code does not post, here is the actual function:
>
> <cffunction name="IsSoEditorEmpty" hint="Checks the SoEditor
> Field for User
> Inserted Content">
> <cfargument name="str" required="true" hint="The
> String to Check">
>
> <cfif ReFindNoCase("<[^>]*>",str,1)>
> <!--- check for image tags. NOTE: add any
> other tags to
> check for here --->
> <cfif ReFindNoCase("<img",str,1)>
> <cfreturn FALSE>
> <cfelse>
> <cfset
> TempStr=ReReplaceNoCase(str, "<[^>]*>| ", "", "ALL")>
> <cfif not len(trim(TempStr))>
> <cfreturn TRUE>
> </cfif>
> </cfif>
> </cfif>
> </cffunction>
>
>
> At 01:58 PM 23/10/02 -0700, you wrote:
> >Take off eh! Are you Canadian? ;)
> >
> >The code is pretty simple, here it is: (FYI, this code
> tackles the SoEditor
> >problem I mentioned a few posts back...)
> >Also, interestingly enough, if I take out the entire body of
> the UDF, I get
> >the same error...
> >
> >
> ><cfif IsSoEditorEmpty(attributes.htmlbody)>
> > <cfset attributes.htmlbody="">
> ></cfif>
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.