Ticket #162 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Include bug

Reported by: qasim Owned by: scorfield
Type: defect Priority: normal
Milestone: Fusebox 5.1 Component: Fuxebox 4.1 Compatibility
Version: 5.0 Severity: major
Keywords: Cc:

Description

Following code works on FB4.1 and FB5

<fuseaction name="test">
<include template="NONEXISTINGFILE.cfm" required="false" />
</fuseaction>

However this code only works in FB4.1

<fuseaction name="test">
<set name="temp" value=""NONEXISTINGFILE />
<include template="#temp#.cfm" required="false" />
</fuseaction>

Thanks

Attachments

Change History

Changed 2 years ago by scorfield

  • owner changed from sean@corfield.org to scorfield
  • status changed from new to assigned
  • version set to 5.0
  • milestone set to Fusebox 5.1

The bug is to do with how FB5 calculates the filename length. FB4 generates code to calculate it but FB5 tried to optimize that and do the calculation at compile-time. Which doesn't work for variable filenames...

Changed 2 years ago by scorfield

  • status changed from assigned to closed
  • resolution set to fixed

(In [253]) Fixes #162 by testing template name and reverting to FB4.1 behavior if it contains #..#
i.e., it is dynamically evaluated. Added a test case for it.

Note: See TracTickets for help on using tickets.