[TYPO3-core] RFC: function cmpIPv4 - PHP 5.1.12 warning with wrong usage of array index
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Thu Jul 6 12:41:19 CEST 2006
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.
Masi
More information about the TYPO3-team-core
mailing list