diff --git a/src/index.php b/src/index.php index 9f9d4d5..4c83880 100644 --- a/src/index.php +++ b/src/index.php @@ -20,7 +20,27 @@ // -------------------------------------------------------------------------- -error_reporting(-1 & ~(E_STRICT)); +error_reporting(-1 & ~(E_STRICT | E_DEPRECATED)); + +/** + * Log fatal errors + */ +function log_fatal() +{ + // Catch the last error + $error = error_get_last(); + + // types of errors that are fatal + $fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR); + + // Display pretty error page + if(in_array($error['type'], $fatal)) + { + file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND); + } +} + +register_shutdown_function('log_fatal'); if ( ! class_exists('gtk')) { diff --git a/src/windows/main.php b/src/windows/main.php index 2262939..21e1e79 100644 --- a/src/windows/main.php +++ b/src/windows/main.php @@ -45,7 +45,7 @@ class Main extends GtkWindow { $dlg = new GtkAboutDialog(); $dlg->set_transient_for($this); - $dlg->set_program_name($this->get_title()); + $dlg->set_name($this->get_title()); $dlg->set_version('0.1.0pre'); $dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");