Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BlueSkyDetector/1332795 to your computer and use it in GitHub Desktop.
Save BlueSkyDetector/1332795 to your computer and use it in GitHub Desktop.
diff -uNrp zabbix-1.6.9.orig/frontends/php/include/config.inc.php zabbix-1.6.9/frontends/php/include/config.inc.php
--- zabbix-1.6.9.orig/frontends/php/include/config.inc.php 2010-03-25 23:53:21.000000000 +0900
+++ zabbix-1.6.9/frontends/php/include/config.inc.php 2011-10-27 11:54:13.000000000 +0900
@@ -85,9 +85,13 @@ function TODO($msg) { echo "TODO: ".$msg
require_once 'include/validate.inc.php';
function zbx_err_handler($errno, $errstr, $errfile, $errline){
- error($errstr.'['.$errfile.':'.$errline.']');
-// show_messages();
-// die();
+ $pathLength = strlen(__FILE__);
+
+ // strlen(include/config.inc.php) = 22
+ $pathLength -= 22;
+ $errfile = substr($errfile, $pathLength);
+
+ error($errstr.' ['.$errfile.':'.$errline.']');
}
/********** START INITIALIZATION *********/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment