CRM-8963


Fix warnings and PHP 5.4 notices