Bug fix for GlobIterator extending service #3813

Merged
merged 1 commit into from Feb 19, 2013

2 participants

@EvanDotPro
Zend Framework 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.

@EvanDotPro EvanDotPro Bug fix for GlobIterator extending service
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.
d66fd64
@ralphschindler ralphschindler merged commit d66fd64 into zendframework:master Feb 19, 2013

1 check passed

Details default The Travis build passed
@ralphschindler ralphschindler added a commit that referenced this pull request Feb 19, 2013
@ralphschindler ralphschindler Forward #3813 a5f01b0
@ghost Unknown pushed a commit that referenced this pull request Jul 14, 2013
@ralphschindler ralphschindler Forward #3813 6ff6d21
@gianarb gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
@ralphschindler ralphschindler Forward zendframework/zendframework#3813 bd11849
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment