Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

fMessaging::check returning true upon first call .. ?

posted by joho 9 years ago

In my config.php file I set up some "global" (or common) stuff, then I initiate the session and create a default template instance. On the line after that, I do:

if (fMessaging::check ('fatal', '/app'))
    die ('foo1');

And the application immediately terminates (with "foo1" being output). It seems like fMessaging::check returns true regardless of if that particular message is set or not. What am I doing wrong?

If I force an emptying of the message queue for the particular section, prior to the first check(), like so:

fMessaging::retrieve ('fatal', '/app');
if (fMessaging::check ('fatal', '/app'))
    die ('foo1');

I get the expected result.

Well, fMessaging just uses the $_SESSION to store messages. Right before you call fMessaging::check(), try checking the contents to $_SESSION to see if the value really is there. If it is, you'll need to figure out what is setting it.

posted by wbond 9 years ago

Wicked .. I thought I was creating one-off sessions that were destroyed when the browser terminates, but I guess not. Well, just doing an "empty" fMessaging::check ('fatal', '/app'); in config.php (obviously) does the trick in this case.

posted by joho 9 years ago

I need to contact site admin urgently. Can you understand me? Hope for no silence

posted by wikifunna 9 years ago