Project

General

Profile

Actions

Task #35010

closed

unused variable $errorMsg in logDeprecatedFunction

Added by Simon Schaufelberger almost 12 years ago. Updated almost 10 years ago.

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

0%

Estimated time:
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 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22614: c&p error in t3lib_div::logDeprecatedFunctionClosedSteffen Kamper2010-05-09

Actions
Actions #1

Updated by Markus Klein almost 12 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

Actions #2

Updated by Simon Schaufelberger almost 12 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

Actions #3

Updated by Jigal van Hemert almost 12 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.

Actions #4

Updated by Markus Klein about 10 years ago

  • Status changed from On Hold to Needs Feedback

Still an issue?

Not on 6.2 I guess

Actions #5

Updated by Simon Schaufelberger about 10 years ago

not any more in 6.2

Actions #6

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF