We establish a second-order almost sure limit theorem for the minimal position in a one-dimensional super-critical branching random walk, and also prove a martingale convergence theorem which answers a question of Biggins and Kyprianou [Electron. J. Probab. 10 (2005) 609–631]. Our method applies, furthermore, to the study of directed polymers on a disordered tree. In particular, we give a rigorous proof of a phase transition phenomenon for the partition function (from the point of view of convergence in probability), already described by Derrida and Spohn [J. Statist. Phys. 51 (1988) 817–840]. Surprisingly, this phase transition phenomenon disappears in the sense of upper almost sure limits.