[TYPO3-core] RFC #11815: Saving translation: strcmp() expects parameter 2 to be string (PHP5.3)

Stefan Geith typo3dev2009.nospam1 at geithware.de
Thu Nov 26 09:16:00 CET 2009


REMINDER


Stefan Geith schrieb:
> REMINDER.
> 
> Steffen Gebert schrieb:
>> Am 10.10.2009, 00:25 Uhr, schrieb Steffen Gebert 
>> <steffen at steffen-gebert.de>:
>>
>>> On Fri, 28 Aug 2009 14:34:01 +0200, Steffen Gebert 
>>> <steffen at steffen-gebert.de> wrote:
>>>
>>>> On Fri, 28 Aug 2009 14:09:26 +0200, Steffen Kamper <info at sk-typo3.de>
>>>> wrote:
>>>>
>>>>> after !array, is this type cast superfluous?
>>>>> $settings[$key] = (string)$CHANGED_SETTINGS[$key];
>>>>
>>>>
>>>> Okay.. weird. Those PHP-guys really change behavior of strcmp(*, 
>>>> array())!
>>>> Thanks for making me think again!
>>>>
>>>> Try
>>>> echo (@strcmp('foo', array('foo')) ? "true" : "false");
>>>> on PHP5.2 (-> true) and PHP5.3 (-> false).
>>>>
>>>> Therefore
>>>> $settings[$key] = (string)$CHANGED_SETTINGS[$key];
>>>> $changed = 1;
>>>> was executed with 5.2 and so we have to check is_array() instead of
>>>> !is_array() (and the cast is needed).
>>>
>>> REMINDER
>>>
>>> This causes a PHP warning with PHP5.3!
>>
>>
>> REMINDER
>> _______________________________________________
>> Before posting to this list, please have a look to the posting rules
>> on the following websites:
>>
>> http://typo3.org/teams/core/core-mailinglist-rules/
>> http://typo3.org/development/bug-fixing/diff-and-patch/
>> _______________________________________________
>> TYPO3-team-core mailing list
>> TYPO3-team-core at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
> 
> 



More information about the TYPO3-team-core mailing list