New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getService should make sure `$this->{$property}` does not exists/is_null before setting the service reference in #52

rtripault opened this Issue Oct 3, 2014 · 0 comments


None yet
1 participant
Copy link

rtripault commented Oct 3, 2014

When getting a new service, the service name is also used to define a property on xPDO (see

There should be some upfront check to make sure the property does not exist, or is null to prevent any issue (ie. $xpdo->getService('services', 'ThirdPartyClass', '/path/to/class/) will "override" xPDO->services).

Suggested behavior : log a warning & prevent setting the property (service should still be instantiated & available, just not in xPDO->{$serviceName})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment