Refs #3089, remove some debugging code, fix warnings on PHP 5.5.