[TYPO3-core] RFC: function cmpIPv4 - PHP 5.1.12 warning with wrong usage of array index

Franz Holzinger franz at fholzinger.com
Tue Aug 29 09:12:32 CEST 2006


This is a reminder.

Martin Kutschker a écrit :

>Franz Holzinger schrieb:
>  
>
>>Hello Martin,
>>
>>
>>    
>>
>>>Franz Holzinger schrieb:
>>>
>>>
>>>
>>>      
>>>
>>>>Description:
>>>>
>>>>The following line causes a lot of the same error message in PHP 5.1.12.
>>>>You will get this on the screen with phpMyAdmin if you have turned on
>>>>the display of error messages in php.ini and the install tool.
>>>>
>>>>functions cmpIPv4 and cmpIPv6
>>>>
>>>>list($test,$mask) = explode('/',$test);
>>>>        
>>>>
>>>So can avoid all the changes from $test to $testArray (testef with E_ALL).
>>>
>>>$test = explode('/',$test);
>>>$mask = (isset($test[1])) ? $test[1] : '';
>>>$test = $test[0];
>>>
>>>      
>>>
>>This works fine without any warning message now. See new patch.
>>    
>>
>
>+1 for the new version.
>
>FYI: PHP5 doesn't like a list() with more items in list than in the array. 
>The diff handles this. So nothing really to worry.
>
>  
>
anyone else?


- Franz






More information about the TYPO3-team-core mailing list