fixed PHP 5.2 incompatibility introduced with commit 9644465b