Bug Reports
MergeText bug
Gravatar is a globally recognized avatar based on your email address. MergeText bug
  Marcel DESMET
  All
  Nov 4, 2026 @ 11:06am

Hello,

If for some unpredictable reason your string turns into a boolean, MergeText enters an endless loop.

Gravatar is a globally recognized avatar based on your email address. re: MergeText bug
  Rick Strahl
  Marcel DESMET
  Nov 4, 2026 @ 09:03pm

some unpredictable reason your string turns into a boolean

If you pass in a boolean - yes it will hang. But otherwise - no.

Actually you'd have to explicitly pass in .t.. .f. defaults to an empty string - that would be hard to do unless you have a pretty major logic error leading up to the call to MergeText().

I suppose the safer way to check in wwEval.MergeText() would be:

tcString = IIF(VARTYPE(tcString) != "C", "", tcString)
tcDelimiter=IIF(VARTYPE(tcDelimiter) != "C","<%",tcDelimiter)
tcDelimiter2=IIF(VARTYPE(tcDelimiter2) != "C","%>",tcDelimiter2)

Of course that code preceeded VARTYPE() originally, and TYPE() checks were too slow because of the implicit eval. 😄

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: MergeText bug
  Marcel DESMET
  Rick Strahl
  Nov 5, 2026 @ 08:26am

that would be hard to do

I did it! 😃

Gravatar is a globally recognized avatar based on your email address. re: MergeText bug
  Rick Strahl
  Marcel DESMET
  Nov 5, 2026 @ 09:45am

Well, I've made the fix, so you can continue to "do it" 😄

... and at least not lock up MergeText().

+++ Rick ---

© 1996-2026