Hello there,
My previous version was 2.4.3 so I tried the 2.4.6
Now I have fatals when I try to GET an object with custom clone function. Here a simplified example:
class Guide
{
/** attributes **/
...
public function __clone()
{
$this->setId(null);
/** other modifications **/
...
}
/** other functions **/
...
}
In ReadListener.php, this line:
$request->attributes->set('previous_data', $this->clone($data));
will clone my Guide object but when the function getIriFromItem() in IriConverter.php is called, it will fail when trying to create an IRI because the id is null and raise an Exception.
Should I nullify the id outside of the clone function? Is there a way to disable previous_data on GET because I don't need it? Or is it a bug?
Thanks
Hello there,
My previous version was 2.4.3 so I tried the 2.4.6
Now I have fatals when I try to GET an object with custom clone function. Here a simplified example:
In ReadListener.php, this line:
$request->attributes->set('previous_data', $this->clone($data));will clone my Guide object but when the function getIriFromItem() in IriConverter.php is called, it will fail when trying to create an IRI because the id is null and raise an Exception.
Should I nullify the id outside of the clone function? Is there a way to disable previous_data on GET because I don't need it? Or is it a bug?
Thanks