[TYPO3-core] Patch for uninitialized variable in class.tslib_pagegen.php
Holzinger Franz
franz at fholzinger.com
Thu Dec 29 19:14:22 CET 2005
Hello Dmitry,
>+++ class.tslib_content.php 28 Dec 2005 20:22:44 -0000
>@@ -626,7 +626,7 @@
> $substKey =
$ext.'_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();
> $content.='<!--'.$substKey.'-->';
> $GLOBALS['TSFE']->config[$ext.'incScript'][$substKey]
= array(
>- 'file'=>$incFile,
>+ 'file'=>'',
> 'conf'=>$conf,
> 'cObj'=>serialize($this),
> 'type'=>'COA'
What has been the former intention with $incFile?
> return $gifCreator->getImageDimensions($theImage);
>- break;
I do not think this makes it more understandable. And it is breaking the
switch clause by a return.
Better solution:
use a $rc variable and return it after the switch clause.
>@@ -328,10 +328,8 @@
> switch($type) {
> case 'user':
> return $this->uc[$key];
>- break;
> case 'ses':
> return $this->sesData[$key];
>- break;
> }
> }
> }
bad
Regards,
Franz
More information about the TYPO3-team-core
mailing list