[TYPO3-dev] Extensions need update for 4.3!

Ingo Renner ingo at typo3.org
Mon Oct 13 16:40:23 CEST 2008


Ernesto Baschny [cron IT] wrote:
> Steffen Kamper wrote: on 09.10.2008 15:29:
> 
>> i see the point, but this is a workaround for a wrong call.
>> The function was declared all the time to be used with arrays, so if an
>> extension calls it with NULL it is (and was) wrong.
>>
>> Sure, php4 wasn't that fussy with wrong types, php5 is.
>>
>> So throwing this error is good imho to educate the devs for using API
>> the right way.
>>
>> If you don't like the error message you can switch off displayErrors of
>> coarse.
> 
> I am more for a road in between. Educate the devs is ok, but still keep
> it working for the (bigger) masses. :)

no really. again, there's nothing we did wrong. I care for those who did 
everything right, but I don't for those who are lazy and force new work 
on us by being lazy...

> The API (meaning the "code") always allowed "NULL" values to be passed
> as parameters, that has not changed even with PHP5. There was no type
> hinting before (4.2 works fine in PHP5, not extension broke).

we might just not know about them

> We gain
> nothing in changing it now apart from the fact that some extensions will
> stop working. 

I say this is not our fault and as mentioned before: tell me a single 
reason why I should care?

> I don't see a reason to do that. We could stop people
> passing strings or integers, that is ok ("education"), my suggestion was
> exactly that: allow only arrays AND the NULL value (nothing else). 

but then we would still have to check for null, which even if it is fast 
is unnecessary as it helps to support lazyness and bad code.

> Won't
> break any extension, we still have type hinting, everybody happy?

nope.

> We need to use some common sense here and there in those kind of stuff.

yes, but common sense tells me different things for this case.



Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2




More information about the TYPO3-dev mailing list