[TYPO3-core] RFC #16891: Bug: shopic.php causes a fatal error if parameters GET variable is not an array
Helmut Hummel
helmut.hummel at typo3.org
Mon Jan 3 14:33:50 CET 2011
Hi,
Am 03.01.2011 11:01, schrieb Franz Holzinger:
> Forget my last posting!
[x] done ;)
> I have seen it now:
>
> + if (!$this->file || !isset($parametersArray) ||
> !is_array($parametersArray)) {
> + die('Parameter Error: No file or no parameters given.');
> }
>
> Is is necessary to die here? IMHO a die is not a good solution.
Well it is better than a php fatal error (see bug report) and if
parameters are not provided there would be a die() anyway after the md5
is checked. I just wanted to exit earlier since the parameters are
mandatory anyway.
I agree however that die() is not nice, that's why my patch for trunk
contains exceptions which will be nicely catched by the exception handling.
I would not change this in the other branches though, it's like it has
been for ages now...
Regards Helmut
More information about the TYPO3-team-core
mailing list