I recently bumped into a problem with CakePHP 3.
We are working with a Nginx Server and a Postgres Database.
When I try to access a model's property that is NULL, I get an 502 Bad Gateway error, even something simple such as debug($object['editor_id']);die;
.
The column editor_id is type integer, has no modifiers (so no 'not null' and no 'default'), storage is plain.
If this field is not empty, I don't have any problems. Right now that I identified the object generating the 502 error, I have no idea where to search for a solution. What can be potentially wrong with my setup? Also strange is, that the system is working everywhere else but this special case... I'd be glad if anyone can help me with this or has a idea how to further debug.
Thank you!
EDIT: Here is just an examplary code snippet:
$this->loadModel('Elements');
$object = $this->Elements->find()->where(['id' => 594])->first();
debug($object['editor_id']);
And 502 Bad Gateway...