`$row` is overwritten inmmediately. Don't know if that's a bug, but I would change the name of the variable anyway.