[TYPO3-dev] Extensions need update for 4.3!

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Oct 9 15:41:51 CEST 2008


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. :)

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 gain
nothing in changing it now apart from the fact that some extensions will
stop working. 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). Won't
break any extension, we still have type hinting, everybody happy?

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

Ernesto




More information about the TYPO3-dev mailing list