Issue Bug Closed

#28085t3lib_div::debugRows can't return data anymore

Sebastian Michaelsen 07/11/11, 10:39 updated 10/02/18, 12:20

Description

In TYPO3 4.5 t3lib_div::debugRows() was deprecated and moved to t3lib_utility_Debug::debugRows()

    /**
     * Displays an array as rows in a table. Useful to debug output like an array of database records.
     *
     * @param    mixed        Array of arrays with similar keys
     * @param    string        Table header
     * @param    boolean        If TRUE, will return content instead of echo'ing out.
     * @return    void        Outputs to browser.
     * @deprecated since TYPO3 4.5 - Use t3lib_utility_Debug::debugRows instead
     */
    public static function debugRows($rows, $header = '', $returnHTML = FALSE) {
        self::logDeprecatedFunction();
        t3lib_utility_Debug::debugRows($rows, $header, $returnHTML);
    }

The problem is, that t3lib_utility_Debug::debugRows() is just called but not returned, despite the fact that debugRows() offers an option $returnHTML to return an HTML table.
So in the (a bit unlikely) case someone relies on values returned by t3lib_div::debugRows(), 4.5 broke his code.

Adding a simple “return” will solve this problem.

Reviews 2