Fix php.pear.net Bug #20013

This branch is a fix for the following bug:

https://pear.php.net/bugs/bug.php?id=20013