Project

General

Profile

Actions

Bug #39854

closed

t3lib_db->fullQuoteString unused method argument

Added by Marek Mizera over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2012-08-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello. It's not exactly a bug, but rather anoying thing, which could also resolve in error behaviour.

method t3lib_db->fullQuoteString has second argument $table, which is unused, but does not have set default value. So if you forget to set this argument, php raise warning, which is captured with some typo3 error handler silently, but script continues without neccesary string.

So I'm proposing to set default $table value to null (in all quote string methods), remove it completelly :

file ./t3lib/class.t3lib_db.php

function fullQuoteStr($str, $table = null)
function fullQuoteArray($arr, $table = null, $noQuote = FALSE)
function quoteStr($str, $table = null)

Actions #1

Updated by Francois Suter over 12 years ago

  • Project changed from 1106 to TYPO3 Core

Wrong bug tracker

Actions #2

Updated by Francois Suter over 12 years ago

  • Category set to Database API (Doctrine DBAL)
  • Status changed from New to Rejected
  • Assignee set to Francois Suter
  • TYPO3 Version set to 4.7

The table argument is needed when using the DBAL abstraction layer. Any extension that left out this value to rely instead on a "NULL" default value would run the risk of breaking when another DBMS is used. I agree that this parameter may seem useless at first sight, but it does have a use and cannot be removed or changed to a meaningless (in this context) default value. Do you agree? In the meantime, I'm closing this bug report.

Actions

Also available in: Atom PDF