Last modified: 2010-05-15 15:41:15 UTC
in /wiki/config/index.php on line 421 wrong operation applied to arrays
on my PHP 5.1.4
$array1 + $array2 cause replacing $array1 = $array2 and so on
using array_marge($array1,$array2) solves the problem
Applying said patch causes running index.php to halt after the following
initialisation sequence of the install page. The patch given appears to break
* PHP 5.1.6-1 installed
* Found database drivers for: MySQL
* PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* PHP's memory_limit is 50M. If this is too low, installation may fail!
* Have zlib support; enabling output compression.
* Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions
cannot be used.
The concern appears to be correct, regardless of whether the patch is.
http://www.php.net/manual/en/language.operators.array.php clearly states that
$array1 + $array2 behaves as Keymone says. array_merge() shouldn't cause any
problems, are you sure that it's not your testing procedure at fault?
I tested the "install" procedure twice. I opened config.php once, applied the
patch, and then refreshed config.php. The element at fault is clearly the patch
did you looked at resulting array?
$a + $b will be a union only if it's associated array. in case of simple array:
array(1,2,3,4) + array(5,6,7) == array(5,6,7,4)
it's noted in php help also:
maybe there is another solution for the problem
Fixed in r17380