[TYPO3-core] RFC: getURL fix for error cases and curl

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Aug 7 11:25:34 CEST 2006


Ernesto Baschny [cron IT] schrieb:
> 
> Fix:
> The curl_setopt($ch, CURLOPT_FAILONERROR, 1) addition will make
> curl_exec return "false" which is what getURL currently does without
> curl on error situations. I am pretty sure this shouldn't break any
> existing application, except if we want to get the 404 content back
> (which would currently only work with curl anyway).

+1

> Future vision/todo:
> Make getURL return an array where we can specify more information about
> the error cases and not just "false". Or when refactoring for 5.0 this
> could be an object that is also able to store the error message.

I already suggested it, but there was not generally liked.

IMHO, we could also make getURL make a wrapper for a new version with error 
reporting with an array (eg fetchURL).

Masi



More information about the TYPO3-team-core mailing list