Improved handling of PHP errors
Merge branch 'origin/master'