Fix array access syntax for older PHP

There was a syntax error when running tests in PHP 5.3.10.

Older PHP versions don't seem to like accessing arrays directly that were returned from a function call...

Please review @schiesbn @DeepDiver1975 @karlitschek