[TYPO3-core] RFC #0015658
Jigal van Hemert
jigal at xs4all.nl
Tue Sep 7 19:22:17 CEST 2010
Hi,
On 7-9-2010 17:51, Bjoern Pedersen wrote:
> Problem:If for some reason $parts[0] is empty, an invalid expression is
> passed to parse_url, resulting in an uncaught warning exception
> (flooding sys_log).
>
> Solution:
> The attached patch checks for non-emptiness before calling parse_url.
>
> How to test:
No test method? This makes it very hard to vote by testing...
> As the reasons for the empty part[0] are not yet found, I do not have a
> good plan to test.
You obviously have a site which floods the sys_log with exceptions. If
you put a try/catch construction around the parse_url and produce debug
output of the relevant variables, etc. it's a lot easier to find the
reason for $parts[0] being empty.
There must be something else wrong IMO: if a URL beginning with http://
is detected and all the length checks were successful $parts[0] should
not be empty. Maybe the checks are incorrect for some cases and must be
fixed.
This patch seems more like a symptomatic treatment.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-team-core
mailing list