E_ERROR [1] Call to a member function getId() on a non-object
See details in error.log