Administrator
- Join Date:
- Sep 2009
- Location:
- Stuart, FL
- Posts:
- 14,140
- Plugin Contributions:
- 56
Developers Tool Kit: Line # values are off by 1
I was chasing something down and using Developers Tool Kit to locate the offending line, went to edit the file with Notepad++, went to the line # specified by DTK ... and it wasn't the right line.
If you, for example, search for <?php in all catalog functions files, you'll find that the string is present in Line #0 of all the files.
/YOUR_ADMIN/developers_tool_kit.php (starting at line 184) currently reads for v1.5.1:
if ($check_case) {
$found_line= 'true';
$found = 'true';
$cnt_found++;
$show_file .= "<br />Line #<strong>{$line_num}</strong> : " ;
//prevent db pwd from being displayed, for sake of security
$show_file .= (substr_count($line,"'DB_SERVER_PASSWORD'")) ? '***HIDDEN***' : htmlspecialchars($line, ENT_QUOTES, CHARSET);
$show_file .= "<br />\n";
} else {
if ($cnt_lines >= 5) {
// $show_file .= ' .';
$cnt_lines=0;
}
}
and should be changed to
if ($check_case) {
$found_line= 'true';
$found = 'true';
$cnt_found++;
$line_nump1 = $line_num+1;
$show_file .= "<br />Line #<strong>{$line_nump1}</strong> : " ;
//prevent db pwd from being displayed, for sake of security
$show_file .= (substr_count($line,"'DB_SERVER_PASSWORD'")) ? '***HIDDEN***' : htmlspecialchars($line, ENT_QUOTES, CHARSET);
$show_file .= "<br />\n";
} else {
if ($cnt_lines >= 5) {
// $show_file .= ' .';
$cnt_lines=0;
}
}