isFlushed() to detect if CFFLUSH has been called

Description

the current error message has a typo and for clarity should mention cfflush
can't assign value to header, header is alredy committed

after <CFFLUSH> is called <CFHTMLHEAD> throws Page is already flushed

the following code can be used to check for cfflush, but it would be nice to
have a BIF something like isPageBuffered()

perhaps <cfheader> also needs an option like for <cflock throw=false> which could be a short cut
for writing the following

also, should flush(); be available? No matching function [FLUSH] found cfflush(); works

Environment

None

Activity

Show:

Zac Spitzer 4 August 2021 at 19:15

isFlushed() feels more cfml-y,

I think we should just add this function to core

Michael Offner 12 October 2017 at 12:45

simply copy this code to library/function/isComitted.cfm

Pothys - MitrahSoft 11 October 2017 at 15:13

I've tested with above code & Confirmed the issue happened. If cfflush calls before <cfheader>,<cfhtmlhead> means it throw error. In ACF also throw same error.

Fixed

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 11 October 2017 at 01:08
Updated 10 March 2024 at 01:16
Resolved 10 March 2024 at 00:58