Phalcon 4 | PHP 7 -> AH00052: child pid 11 exit signal Segmentation fault (11) error? This is why…

The Issue
This is a quick post that will save you a ton of time trying to figure out what is going on.
When I was trying to pull some records from the model, I came across this error. The reason this is happening, is because you cannot use a magic getter method on the model that has been set to hasMany, because you are returning a result set that is an array of objects instead of simply an object as you would
The Solution
Change from this:
$model = ExampleModel::find();
$records = $model->getRelatedModel();
To this:
$model = ExampleModel::find();
$records = [];
foreach($model as $result){
$records[] = $result->getRelatedModel();
}
Then you should be good to go.
Happy Coding!