PHP 5.3 compatibility 3

Sorry for multiple pull-requests.
Update controller.php
Merge pull request #20 from nueckman/patch-3

PHP 5.3 compatibility 3