Description
In Mako 7.0.0 a null related entity throws exception when toArray() called on parent object.
Exception is: Call to a member function toArray() on null
...
Steps to reproduce
Create an object that can have a child object
In model for parent object set $including to include the child object
Let the related object be null.
Convert parent object to array.
ORM is throwing error in toArray() here:
$columns += [$relation => ($related === false ? $related : $related->toArray())];
...
Versions & Platform
| What |
Version |
| PHP Version |
7.5.0 |
| Mako Version |
7.0.0 |
| OS |
MacOS |
| Database |
MariaDb |
Description
In Mako 7.0.0 a null related entity throws exception when toArray() called on parent object.
Exception is: Call to a member function toArray() on null
...
Steps to reproduce
Create an object that can have a child object
In model for parent object set $including to include the child object
Let the related object be null.
Convert parent object to array.
ORM is throwing error in toArray() here:
$columns += [$relation => ($related === false ? $related : $related->toArray())];
...
Versions & Platform