As a complement to Chris Schommer-Pries answer above, the result holds  when the base is a CW complex, as can be seen by a (possibly transfinite induction) on the cells. Here's a sketch.

Clearly, the result is true when $B$ is a point.


For a subcomplex $A\subset B$ let $\Gamma(E_i|A)$ be the space of sections of the restriction $E_{i|A} \to A$ for $i=1,2$. Suppose $A\subset C \subset B$, where $C = A\cup D^j$ is the result of attaching a single cell to $A$. Then we have a pullback square
$\require{AMScd}$
$$
\begin{CD}
\Gamma(E_i|C) @>>> \Gamma(E_i|A)\\
@VVV @VVV \\
\Gamma(E_i|D^j) @>>> \Gamma(E_i|S^{j-1})
\end{CD}$$
which is also a homotopy pullback because the horizontal arrows are Serre fibrations. This gives a long exact sequence in homotopy groups
$$
...\to \pi_n(\Gamma(E_i|C)) \to \pi_n(\Gamma(E_i|D^j)) \oplus 
\pi_n(\Gamma(E_i|A)) \to 
\pi_n(\Gamma(E_i|S^{j-1}))\to ...
$$
(where I am being a bit sloppy with the notation for $n \le 1$).
The square for $i=1$ maps to the square for $i=2$.  


Inductively, assume the result is true for $A$. The result is clearly true for $S^{j-1}$ and $D^j$ since in these cases where are dealing with a homotopically trivial fibration of the form $F \times X \to X$ where 
$X= D^j$ or $S^{j=1}$.  Then by the five lemma applied to the long exact sequence, we obtain the result for $C$. This gives the inductive step.