Ticket 4059

New pull request for fix to https://github.com/cakephp/cakephp/issues/2105