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

Stefan Geith typo3dev2008.nospam1 at geithware.de
Mon Sep 15 15:46:09 CEST 2008


Hi Dmitry, Hi Oliver,

Oliver Klee schrieb:
> Hi Dmitry,
> 
> Dmitry Dulepov [typo3] schrieb:
>> I can be set to empty array if it is not an array in $_GET. Is this 
>> what you mean?

$this->CMD get initialized within the first 10 lines of init():

     function init()	{
         ...
         // Setting GPvars:
         $this->CMD = t3lib_div::_GP('CMD');

I could change this simply to (1):
         $this->CMD = (array) t3lib_div::_GP('CMD');
or to (2):
         $this->CMD = is_array(t3lib_div::_GP('CMD')) ?
                         t3lib_div::_GP('CMD') : array();
or to (3):
         $this->CMD = t3lib_div::_GP('CMD');
	if (!is_array($this->CMD)) {
		$this->CMD = array();
         }

What would you prefer ?

-

Stefan


More information about the TYPO3-team-core mailing list