[TYPO3-dev] Extensions need update for 4.3!
Dmitry Dulepov
dmitry at typo3.org
Thu Oct 9 18:32:09 CEST 2008
Hi!
ries van Twisk wrote:
> We all know as programmers that NULL is special, it doesn't define a
> specific type.
I am not a programmer than... If I see that it must be an array, I pass array, not null.
> And there is nothing in PHP that prevents you to pass NULL even though
> you can explicately define in the function a array needs to be passed.
Yes? I just tried:
<?php
function foo(array $al) {
echo 'La-la' . chr(10);
}
foo(null);
?>
Catchable fatal error: Argument 1 passed to foo() must be an array, null given, called in /Users/dima/1.php on line 7 and defined in /Users/dima/1.php on line 3
So null is not valid when array is expected.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/
More information about the TYPO3-dev
mailing list