Task #35010
closed
unused variable $errorMsg in logDeprecatedFunction
Added by Simon Schaufelberger over 12 years ago.
Updated over 10 years ago.
Description
// trigger PHP error with a short message: <function> is deprecated (called from <source>, defined in <source>)
$errorMsg = 'Function ' . $trail[1]['function'];
if ($trail[1]['class']) {
$errorMsg .= ' of class ' . $trail[1]['class'];
}
$errorMsg .= ' is deprecated (called from ' . $trail[1]['file'] . '#' . $trail[1]['line'] . ', defined in ' . $function->getFileName() . '#' . $function->getStartLine() . ')';
this nice code is not used later again which is really sad because it is a nice snippet of code.
Reference to $errorMsg was removed in
Revision: 547cc26f7d387fb8406cadf3740740b1998d08ce
Author: Steffen Kamper
Date: 13.05.2010 14:32:11
Message:
Fixed bug #14341: c&p error in t3lib_div::logDeprecatedFunction
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7589 709f56b5-9817-0410-a4d7-c38de5d9e867
----
Modified : ChangeLog
Modified : t3lib/class.t3lib_div.php
this "bug" is still not solved yet as the code that is really printed into deprecationlog is defined later so this is just trash code but the deprecationlog is missing those useful information so it would be nice to add those to deprecationlog
- Tracker changed from Bug to Task
- Category set to Code Cleanup
- Status changed from New to On Hold
Created a relationship to the logging project.
The unused code was meant for a previous logging attempt. The information going in the deprecation log is actually more useful for a developer because it contains a complete trace.
The logging project can replace this snippet with a call to new logging API and remove it in older branches.
- Status changed from On Hold to Needs Feedback
Still an issue?
Not on 6.2 I guess
- Status changed from Needs Feedback to Closed
Also available in: Atom
PDF