This plugin builds on the suggestion I made to have the database's query_factory class include a debug_backtrace when a database interface error is detected, to aid in problem determination. There are other cases when a Zen Cart myDEBUG*.log file is created in which a "victim" (usually one of the Zen Cart built-in functions) is identified, but the "culprit" is actually the function's caller. This plugin updates the Zen Cart's built-in error handling (both admin- and store-side) to include a PHP debug_backtrace as part of the debug-log. That is, instead of receiving:
you'll receive the following log from which you can easily determine the "culprit" (/includes/init_includes/init_item.php):Code:[19-Jun-2014 20:19:22] PHP Warning: strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\testing\includes\functions\functions_general.php on line 64
I'll be submitting this to the Plugins area shortly and will post back the download link once I've received it!Code:[19-Jun-2014 20:19:22] #1 strtr() called at [C:\xampp\htdocs\testing\includes\functions\functions_general.php:64] #2 zen_parse_input_field_data() called at [C:\xampp\htdocs\testing\includes\init_includes\init_item.php:8] #3 require(C:\xampp\htdocs\testing\includes\init_includes\init_item.php) called at [C:\xampp\htdocs\testing\includes\autoload_func.php:48] #4 require(C:\xampp\htdocs\testing\includes\autoload_func.php) called at [C:\xampp\htdocs\testing\includes\application_top.php:150] #5 require(C:\xampp\htdocs\testing\includes\application_top.php) called at [C:\xampp\htdocs\testing\index.php:26] [19-Jun-2014 20:19:22] PHP Warning: strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\testing\includes\functions\functions_general.php on line 64


Reply With Quote
