PHP error patch

This patch is described in #18 and corrects a PHP error.