projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e2a432
)
Ajax runtime fatal error handling added [0000003]
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 24 Jul 2008 21:13:57 +0000
(21:13 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 24 Jul 2008 21:13:57 +0000
(21:13 +0000)
includes/session.inc
patch
|
blob
|
history
diff --git
a/includes/session.inc
b/includes/session.inc
index 0354221d9baa2af4d303ef7b22ad7253a4305675..34e01cd214a56260a76802006cd53d6a30fcde6f 100644
(file)
--- a/
includes/session.inc
+++ b/
includes/session.inc
@@
-11,7
+11,14
@@
function output_html($text)
{
- global $before_box, $Ajax;
+ global $before_box, $Ajax, $messages;
+ // Fatal errors are not send to error_handler,
+ // so we must check the output
+ if ($text && preg_match('/\bFatal error(<.*?>)?:(.*)/i', $text, $m)) {
+ $Ajax->aCommands = array(); // Don't update page on errors
+
+ $messages[] = array(E_ERROR, $m[0], null, null);
+ }
$Ajax->run();
return in_ajax() ? fmt_errors() : ($before_box.fmt_errors().$text);
}