Elgg/Elgg — pull request #6276 by Srokap (2013-12-11 06:17:25+00:00)
Title: Scrutinizer fixes

Fixes to problems detected with Scrutinizer.

Based on top of https://github.com/Elgg/Elgg/pull/6255, merge that one first.