Please remove previous query which fetch old $ord variable see https://github.com/romainneutron/Phraseanet/blob/243b99dcd2c96cb8ca66ee9ff3de291b64f6afe0/lib/classes/collection.php#L579-584