Follow-on to 1e4d75c12072b49c3469f18af13bcf3439afc6b0 for #1975.
Don't try to use an array index on a function return, that's not supported
in PHP 5.3
Merge branch 'master' of github.com:gallery/gallery3