mirror of
https://github.com/pi-hole/web.git
synced 2025-12-25 05:05:33 +00:00
Merge pull request #762 from pi-hole/feature/PHP_error_display
Settings page: Display PHP errors
This commit is contained in:
@@ -209,16 +209,11 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
// Auto dismissal for info and error notifications
|
||||
// Auto dismissal for info notifications
|
||||
$(document).ready(function(){
|
||||
var alInfo = $("#alInfo");
|
||||
var alError = $("#alError");
|
||||
if(alInfo.length)
|
||||
{
|
||||
alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); });
|
||||
}
|
||||
if(alError.length)
|
||||
{
|
||||
alError.delay(3000).fadeOut(2000, function() { alError.hide(); });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -19,6 +19,13 @@ else
|
||||
$piholeFTLConf = array();
|
||||
}
|
||||
|
||||
// Handling of PHP internal errors
|
||||
$last_error = error_get_last();
|
||||
if($last_error["type"] === E_WARNING || $last_error["type"] === E_ERROR)
|
||||
{
|
||||
$error .= "There was a problem applying your settings.<br>Debugging information:<br>PHP error (".htmlspecialchars($last_error["type"])."): ".htmlspecialchars($last_error["message"])." in ".htmlspecialchars($last_error["file"]).":".htmlspecialchars($last_error["line"]);
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.tooltip-inner {
|
||||
|
||||
Reference in New Issue
Block a user