The formula is indeed incorrect, including the case when $z=0$.
In the simple case that $z=0$, you have a diagonal matrix, and the exponential of a diagonal matrix $\exp\begin{pmatrix}a&0\\0&b\end{pmatrix}$ is the diagonal of the exponentials $\begin{pmatrix}e^a&0\\0&e^b\end{pmatrix}$. In your case it would give
$$\exp\begin{pmatrix}w&0\\0&1\end{pmatrix}=\begin{pmatrix}e^w&0\\0&e\end{pmatrix}.\tag1$$
In the general case that $z\neq0$, you need a general expression for the $n$th power of you matrix $M=\begin{pmatrix}w&z\\0&1\end{pmatrix}$, which is easy to see is of the form $M^n=\begin{pmatrix}w^n&u_n\\0&1\end{pmatrix}$, where $u_1=z$ and $u_{n+1}=wu_n+z$, so therefore $u_{n+1}=z\sum_{k=0}^nw^k=z\frac{w^{n+1}-1^{n+1}}{w-1}$.
Since the matrix exponential is defined as $\exp M=\sum_{n=0}^\infty\frac1{n!} M^n$, everything stays just as in (1) except the right-hand corner, which is given by
$$
\left(\exp M\right)_{12}=\sum_{n=0}^\infty\frac{u_n}{n!}
=\frac{z}{w-1}\left[\sum_{n=0}^\infty\frac{w^n}{n!}-\sum_{n=0}^\infty\frac{1^n}{n!}\right]
=z\frac{e^w-e}{w-1}.
$$
The final result is then $$\boxed{\exp\begin{pmatrix}w&z\\0&1\end{pmatrix}=\begin{pmatrix}e^w&z\frac{e^w-e}{w-1}\\0&e\end{pmatrix}.}\tag2$$