Migration from cakephp 2.2 with php 5.6 version to the cakephp version 2.10 and php 7.3.8

Hi Guys As I am new to cakephp So i gave the task of migrating into the above version .

I installation setup is completed and now i am solving the error step by step .

In cakephp 2.10 and php 7.3.9 i am getting the error saying that undefined compact error (that is undefined variable) in the $this->set(compact(variable)) .Could you please help me in this regard .
Thanks for your help.

If this is your exact code, then it needs to be $this->set(compact('variable')) (note the quotes around the variable name).