I am trying to integrate some error checking into our fusebox app. However, no matter what I try, I get errors reported where there were no previous errors. That happened yesterday. I have since brought home the error checking code and I just tried it on a much smaller, less complicated fusebox program I am working on. Same result.
Can anyone post some samples of what you do?
Below is what I am currently trying
fbx_Settings.php
PHP Code:
// Define what type of errors we want to handle
error_reporting(E_ERROR | E_WARNING);
// Define the error handling function
set_error_handler("errorHandler" );
// The actual error handler function
require('act/act_errorHandler.php');
act_errorHandler.php
PHP Code:
function errorHandler($errno, $errmsg, $filename, $linenum) {
# create array to hold type of error
$errorType = array (
1 => "Error",
2 => "Warning",
4 => "Parsing Error",
8 => "Notice",
16 => "Core Error",
32 => "Core Warning",
64 => "Compile Error",
128 => "Compile Warning",
256 => "User Error",
512 => "User Warning",
1024 => "User Notice" );
# found an error so alert user to error message and log error
header('location:http://linuxdev/dsp/dsp_errorHandler.php?name=' . basename($filename) . '&num=' . $linenum . '&type=' . $errorType[$errno]);
# prevent further script execution
exit();
}
This is the error that I am getting. Strange thing is, I haven't touched that file. Standard fusebox file straight from the zip file.
The error originated from file fbx_Fusebox3.0_PHP4.1.x.php at line number 203
Here are the lines around it. Line 203 is the line with $FB_["fullPath"]
PHP Code:
/*
*********************SECTION NINE*********************
Attempt to include any nested fbx_Settings.php files, in top-to-bottom order so that variables set in children fbx_Settings.php files can overwrite variables set in higher fbx_Settings.php files. To prevent children fbx_Settings.php files from overwriting variables, use if(!isset(...)) rather than an outright variable assignment ($var = "value"[img]images/smilies/wink.gif[/img]. Alternately, any child fbx_Settings.php can set a variable and lower fbx_Settings.cfm files cannot overwrite it unless they set the variable outright. If any fbx_Settings.php file or directory alias cannot be found, continue on.
*/
$FB_["fullPath"] = ListRest($Fusebox["circuits"][$Fusebox["targetCircuit"]], "/" ); //make a variable to hold the full path down to the target, excluding the root
$FB_["corePath"] = ""; //initialize
$Fusebox["thisCircuit"] = $Fusebox["homeCircuit"]; //current circuit, set to root now
Any ideas?
Bookmarks