[1.3.0] Code fixes for PHP 5.6-dev and 5.7-dev