Skip to content
Snippets Groups Projects
  • Michael Hamann's avatar
    cc58224c
    Fix msg() calls when messages have already been printed · cc58224c
    Michael Hamann authored
    This commit fixes two bugs that occurred when msg() was called after
    html_msgarea() had already been called.
    - the $MSG array is now cleared when it has been printed (otherwise $MSG
      has been printed again when another msg() call was done)
    - headers_sent() didn't work for me, it always reported false although
      html_msgarea() had already been called which might be explainable with
      output buffering. This makes msg() now depend on the first call of
      html_msgarea() or headers_sent() in order to not to break msg() in
      ajax requests etc.
    cc58224c
    History
    Fix msg() calls when messages have already been printed
    Michael Hamann authored
    This commit fixes two bugs that occurred when msg() was called after
    html_msgarea() had already been called.
    - the $MSG array is now cleared when it has been printed (otherwise $MSG
      has been printed again when another msg() call was done)
    - headers_sent() didn't work for me, it always reported false although
      html_msgarea() had already been called which might be explainable with
      output buffering. This makes msg() now depend on the first call of
      html_msgarea() or headers_sent() in order to not to break msg() in
      ajax requests etc.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.