You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use the __clone function inside de User class? Each time I implement this class I get really strange beahavior... The app always return to the login check route!
The text was updated successfully, but these errors were encountered:
I've also just encountered this. Very strange. If anyone has an answer as to why this is, it'd be good to know!
I only needed to nullify a couple of properties in my entity on clone so I've been able to do this in the controller after cloning the entity object but admittedly it would be nicer to have these in __clone()
$obj = new Obj();
$obj2 = clone $obj;
$obj2->setId(null);
This seems to suggest that using __clone() in entities is really a no no unless you safely implement the method. However, even using the example there and only running when the check for an ID passes seems to log me back out...
Is it possible to use the __clone function inside de User class? Each time I implement this class I get really strange beahavior... The app always return to the login check route!
The text was updated successfully, but these errors were encountered: