On Tuesday, July 3, 2012 6:24:01 AM UTC-4, Marcin Oleszkiewicz wrote:
as I said in other sources the same process works fine and also in this
one the getIndexes its already used on line 27... but of course I've
dumped it and the print_r of the getIndexes array shows:
Array
(
[0] => CPV
[1] => IDzleceniodawcy
[2] => PL
[3] => wojewodztwo
)
If getIndexes() returns an array of strings, it's not the appropriate parameter to pass to ensureIndex() on line 75. The indexes should be specified as an associative array, where values are 1 and -1 for ascending or descending, respectively. See
the documentation for more info. I'm not sure why that would cause a crash, though. If I had to guess, the driver would instruct MongoDB to index fields named zero through four in ascending order (if those strings were evaluated as "1" or not "-1")