I have some code in Php using CakePhp 3.6 that is issuing the following alert:
Deprecated (16384): Accessing 'data' as a property will be removed in 4.0.0. Use request->getData() instead. - F:\php\frameworks\cakePhp\bookmarker\src\Controller\ContactController.php, line: 33 [CORE\src\Core\functions.php, line 305]
An example code would be as below:
$this->request->data['email'] = $user_data['email'];
What happens is that if it is a get
I can solve it using getData('email')
for example, but if it's a set
I do not know how to do it, I tried something very strange like the following:
$this->request->getData('email') = $user_data['email'];
I also tried:
$this->request->setData('email', $user_data['email']);
But it did not work.