When a PHPUnit test fails normally on my dev box (Linux Mint), it causes a \"Segmentation Fault\" on my Continous Integration box (Centos). Both machines are running the sam
if you have an object with property pointing to the same object, or other sort of pointer loops, you will have this message while running
serialize($object);
And if you are a Laravel user, and you are dealing with models. And if you think, you will never have this problem, because you avoiding pointer loops by using $hidden
property on your models, please be advised, the $hidden
property does not affect serialize
, it only affects casting to JSON
and array
.
I had this problem, when I had a model saved into a property of a Mailable
object.
fixed with
$this->model->refresh();
in a __construct
method , just before the whole object is serialized.