Fix PHP bug 50224
Update TODO and UPGRADE docs