Task #35010

unused variable $errorMsg in logDeprecatedFunction

Added by Simon Schaufelberger over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2012-03-19
Due date:
% Done:

0%

TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #22614: c&p error in t3lib_div::logDeprecatedFunction Closed 2010-05-09
Related to Logging Project - Task #32566: Go through various core compontents and replace old function calls with new API calls Closed 2013-09-04

History

#1 Updated by Markus Klein over 7 years ago

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

#2 Updated by Simon Schaufelberger over 7 years ago

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

#3 Updated by Jigal van Hemert over 7 years ago

  • 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.

#4 Updated by Markus Klein over 5 years ago

  • Status changed from On Hold to Needs Feedback

Still an issue?

Not on 6.2 I guess

#5 Updated by Simon Schaufelberger over 5 years ago

not any more in 6.2

#6 Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to Closed

Also available in: Atom PDF