[TYPO3-core] Patch for uninitialized variable in class.tslib_pagegen.php
Dmitry Dulepov
dima at spamcop.net
Wed Dec 28 20:56:01 CET 2005
Hi again.
Dmitry Dulepov wrote:
> I just found that uninitialized variable is used in
> class.tslib_pagegen.php. There is no harm but I think a little and
> simple clean up is needed. I attach a patch file and ask your opinion.
I took a look to some other files in tslib and found other uninitialized
variables. For example:
class.tslib_fe.php:
====================
2045: function checkJumpUrl() {
...
2087: $this->jumpurl = str_replace('###SYS_TABLE_NAME###', $tableNameChar, $this->jumpurl); // Put in the tablename of the userinformation
$tableNameChar is not initialized
2513: function INTincScript() {
...
2531: $GLOBALS['TT']->push('Include ' . $INTiS_config [$INTiS_key] ['file'], '');
$INTis_key is not initialized
class.tslib_content.php:
=========================
658: function USER($conf,$ext='') {
...
665: 'file' => $incFile,
$incFile is not initialized
2232: function PHP_SCRIPT($conf,$ext='') {
...
2258: if ($RESTORE_OLD_DATA) {
$RESTORE_OLD_DATA is not initialized in the function but probably
can be set by the script. If it is not set, it will produce a
warning in PHP. Better to check with isset().
4950: function typoLink($linktxt, $conf) {
...
5064: unset($theTypeP);
$theTypeP is not initialized
6557: function checkPidArray($listArr) {
...
6562: $GLOBALS['TT']->setTSlogMessage($error.': '.$query,3);
$query is not initialized
6940: function editPanelPreviewBorder($table,$row,$content,$thick,$conf=array()) {
...
6948: if ($conf['outerWrap.']) $content = $this->stdWrap($panel,$conf['outerWrap.']);
$panel is not initialized
class.tslib_menu.php:
======================
1872: function makeGifs($conf, $resKey) {
...
2017: if (!is_object($cObj)) {$cObj=t3lib_div::makeInstance('tslib_cObj');}
$cObj is not initialized
What do we do? Mostly it is not harmful but better if we have clean code.
I can fix them and post a patch.
Dmitry.
More information about the TYPO3-team-core
mailing list