In CakePHP 2.x, the import of core files has been changed, which means that you need to change App::import('Sanitize'); on App::uses('Sanitize', 'Utility'); . Also remove the $uses statement, it is for loading models and Sanitize not a model.
With these changes, your snippet will look like this:
App::uses('Sanitize', 'Utility'); class MyController extends AppController { function Foo() { $test = Sanitize::paranoid($data); } }
source share