'As for "avoir peur", it's a fixed expression always followed by the preposition de (literally to have fear of), so when used with the definite article les, de + les contract into des :
Il a peur des chiens. => He's scared of (the) dogs.
In the negative, as we said above, les remains the same, so it applies to its contracted form as well: Il n'a pas peur des chiens.'
Does this apply only to fixed expressions ending 'de' as in the case above?