Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Bug fix for GlobIterator extending service#3813

Merged
ralphschindler merged 1 commit into
zendframework:masterfrom
EvanDotPro:hotfix/service-manager-boolean
Feb 19, 2013
Merged

Bug fix for GlobIterator extending service#3813
ralphschindler merged 1 commit into
zendframework:masterfrom
EvanDotPro:hotfix/service-manager-boolean

Conversation

@EvanDotPro
Copy link
Copy Markdown
Member

Reported by andrer on IRC... If a service extends GlobIterator, there
was a problem where we were checking if (!$instance) which would yield a
catchable fatal error that GlobIterator cannot be casted to a boolean.
To solve this, the comparison operators should be strict so PHP does not
try to convert the type internally. The types checked against are the
expected types if no services have been returned, so the overall
behavior should not be changed by this fix at all.

Reported by andrer on IRC... If a service extends GlobIterator, there
was a problem where we were checking if (!$instance) which would yield a
catchable fatal error that GlobIterator cannot be casted to a boolean.
To solve this, the comparison operators should be strict so PHP does not
try to convert the type internally. The types checked against are the
expected types if no services have been returned, so the overall
behavior should not be changed by this fix at all.
@ghost ghost assigned ralphschindler Feb 19, 2013
@ralphschindler ralphschindler merged commit d66fd64 into zendframework:master Feb 19, 2013
ralphschindler pushed a commit that referenced this pull request Feb 19, 2013
gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants