X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fplatal.inc.php;h=5606f047d5c97b1151929b684d1628aa3a61f61a;hb=323e53dc4e0b4d0a65182b179fd27880de0c3ff7;hp=bc09f8e503df2e1ef88a566dc16ae8a3f0c49562;hpb=6995a9b92e68cffcf7a8375080f9e5a210acf0af;p=platal.git diff --git a/include/platal.inc.php b/include/platal.inc.php index bc09f8e..5606f04 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -1,6 +1,6 @@ "Runtime Notice" ); + global $globals; + if (!$globals->debug) { + if (strpos($errortype[$errno], 'Notice') !== false) { + return; + } + } + $errstr = htmlentities($errstr); $GLOBALS['pl_errors'][] = "
". @@ -72,6 +84,16 @@ function pl_error_handler($errno, $errstr, $errfile, $errline) "
"; } +function pl_dump_env() +{ + echo "
";
+    echo "\nSESSION: "; var_export($_SESSION);
+    echo "\nPOST:    "; var_export($_POST);
+    echo "\nGET:     "; var_export($_GET);
+    echo "\nCOOKIE:  "; var_export($_COOKIE);
+    echo "
"; +} + function pl_print_errors() { print join("\n", $GLOBALS['pl_errors']); @@ -79,7 +101,7 @@ function pl_print_errors() set_error_handler('pl_error_handler', E_ALL | E_STRICT); register_shutdown_function('pl_print_errors'); - +// register_shutdown_function('pl_dump_env'); function pl_url($path, $query = null, $fragment = null) {