[TYPO3-core] RFC: Bug #8944: PHP-Error in class.em_index.php on line 4333

Dmitry Dulepov [typo3] dmitry at typo3.org
Fri Jul 11 15:34:42 CEST 2008


Hi!

Oliver Klee wrote:
> Hi Stefan,
> 
> -            foreach($this->CMD as $k => $v) {
> -                $content .= '<input type="hidden" name="CMD['.$k.']" 
> value="'.$v.'" />';
> +            if (is_array($this->CMD)) {
> 
> Why isn't $this->CMD an array in all cases? Instead of this bandaid fix, 
> I propose declaring the member variable as array() in the first place 
> and use type hinting.
> 
> So -1 for this patch.

It happens when EM is called from kickstarter, for example. It is perfectly valid situation when $this->CMD is not set. The code is wrong there. If I remember correctly, $this->CMD comes from $_GET, so should be always validated. Currently it is not. So the patch is ok.

-- 
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml


More information about the TYPO3-team-core mailing list