1
0

only use errorHandlerCreateDOM() if theme has it set

This is odd for all custom or older theme errors and for theme development though.
References #167
This commit is contained in:
Ian
2014-06-02 17:26:08 +02:00
parent 4b3b005833
commit d633a62bdc

View File

@@ -142,9 +142,10 @@ if (!function_exists('errorToExceptionHandler')) {
// while being in tags like <select> to push on top of page, else return non javascript use $str just there
// sadly we can not use HEREDOC notation here, since this does not execute the javascript after finished writing
echo "\n".'<script>
if(typeof errorHandlerCreateDOM == "function") {
var fragment = window.top.errorHandlerCreateDOM("Error redirect: '.addslashes($str).'");
document.body.insertBefore(fragment, document.body.childNodes[0]);
' . "\n</script>\n<noscript>" . $str . "</noscript>\n";
}' . "\n</script>\n<noscript>" . $str . "</noscript>\n";
}
}
}