[TYPO3-team-core-v5] FLOW3: First code sprint of F3PR

Karsten Dambekalns karsten at typo3.org
Tue Sep 16 15:58:46 CEST 2008


Hi.

Christopher Hlubek wrote:
> 2008/9/15 Robert Lemke <robert at typo3.org>:
>> That's error prone and not explicit enough. Better:
>>
>>   if (key_exists('parties', $packageMetaXML->parties) &&
>> count($packageMetaXML->parties) > 0) {
>>
> 
> Why is the "key_exists('parties', $packageMetaXML->parties)" and test
> for count necessary? Can you give a test case where the if fails?

Watch out: array_key_exists doesn't work for object properties anymore!
  http://www.php.net/manual/function.property-exists.php


Regards,
Karsten


More information about the TYPO3-team-core-v5 mailing list