forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
f07fafa
commit d66fd64
Showing
3 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/ZendTest/ServiceManager/TestAsset/GlobIteratorService.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_ServiceManager | ||
*/ | ||
|
||
namespace ZendTest\ServiceManager\TestAsset; | ||
|
||
class GlobIteratorService extends \GlobIterator | ||
{ | ||
public function __construct() | ||
{ | ||
} | ||
} | ||
|