Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.9.6, 1.10.0
-
Fix Version/s: None
-
Component/s: Zend_Application
-
Labels:None
Description
Zend_Application_Bootstrap_BootstrapAbstract::hasResourcePlugin() causes warnings.
See the next code:
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance()
->suppressNotFoundWarnings(false)
->setFallbackAutoloader(true);
$bootstrap = new Zend_Application_Bootstrap_Bootstrap(new Zend_Application('test'));
if ($bootstrap->hasPluginResource('foo')) { // causes warnings.
}
This warning caused by Zend_Application_Bootstrap_BootstrapAbstract::getPluginResource($resource) method.
See the next code:
public function getPluginResource($resource) { //... if (class_exists($plugin)) { // <-- here. May be need to be class_exists($plugin, false); $spec = (array) $spec; $spec['bootstrap'] = $this; $instance = new $plugin($spec); $pluginName = $this->_resolvePluginResourceName($instance); unset($this->_pluginResources[$plugin]); $this->_pluginResources[$pluginName] = $instance; if (0 === strcasecmp($resource, $pluginName)) { return $instance; } } //... }
Issue Links
| This issue duplicates: | ||||
| ZF-7550 | Bootstrap fails after checking out r17414 |
|
|
|
Please try the following code:
Causes warnings:
Warning: include(FrontController.php) [function.include]: failed to open stream: No such file or directory in Z:\usr\local\php-5.2.8\include\Zend\Loader.php on line 136 Warning: include() [function.include]: Failed opening 'FrontController.php' for inclusion (include_path='Z:\home\localhost\www/library;.;z:/usr/local/php-5.2.8/include') in Z:\usr\local\php-5.2.8\include\Zend\Loader.php on line 136I checked out last working copy from a repositary in problem still here.
Warning: include(FrontController.php) [function.include]: failed to open stream: No such file or directory in Z:\usr\local\php-5.2.8\include\Zend\Loader.php on line 136 Warning: include() [function.include]: Failed opening 'FrontController.php' for inclusion (include_path='Z:\home\localhost\www/library;.;z:/usr/local/php-5.2.8/include') in Z:\usr\local\php-5.2.8\include\Zend\Loader.php on line 136