Zend Framework

Missing requires in Zend_Application_Resource_*

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.7, 1.10.0
  • Fix Version/s: 1.10.1
  • Labels:
    None

Description

In the classes
Zend_Application_Resource_Db
Zend_Application_Resource_Dojo
Zend_Application_Resource_Frontcontroller
Zend_Application_Resource_Layout
Zend_Application_Resource_Locale
Zend_Application_Resource_Log
Zend_Application_Resource_Modules
Zend_Application_Resource_Navigation
Zend_Application_Resource_Router
Zend_Application_Resource_Session
Zend_Application_Resource_Translate
Zend_Application_Resource_View

which extend Zend_Application_Resource_ResourceAbstract is the require of the dependent class at the beginning of the class missing.

It should be:
require_once 'Zend/Application/Resource/ResourceAbstract.php';

In the classes
Zend_Application_Resource_Cachemanager
Zend_Application_Resource_Mail
Zend_Application_Resource_Multidb
the require is set correctly.

Normally it works without the requires, but an error occurs, if you use "Zend_Loader_PluginLoader". I tried to add them, then the error was gone.

Activity

Hide
Dolf Schimmel (Freeaqingme) added a comment -

Can you please provide a usecase in which you use the resource plugins outside of Zend_App? These Resource Plugins are meant to be used in conjunction with Zend_App, and then it all works fine.

Show
Dolf Schimmel (Freeaqingme) added a comment - Can you please provide a usecase in which you use the resource plugins outside of Zend_App? These Resource Plugins are meant to be used in conjunction with Zend_App, and then it all works fine.
Hide
Dolf Schimmel (Freeaqingme) added a comment -

Added for consistency. Please note that they may be removed when Zend_App turns 100% dependent on autoloading (that will only occur with a major release).

Show
Dolf Schimmel (Freeaqingme) added a comment - Added for consistency. Please note that they may be removed when Zend_App turns 100% dependent on autoloading (that will only occur with a major release).
Hide
Master Surfer added a comment -

I didn't use the resource plugins outside Zend_App. I added the following part to the application.ini:
*************
resources.log.stream.writerName = "Stream"
resources.log.stream.writerParams.stream = APPLICATION_PATH "/../data/logs/application.log"
resources.log.stream.writerParams.mode = "a+"
resources.log.stream.filterName = "Priority"
resources.log.stream.filterParams.priority = 5
*************
and in the index.php the loader-cache:
*************
require_once 'Zend/Loader/PluginLoader.php';
$classFileIncCache = realpath(APPLICATION_PATH . '/../data/cache') . DIRECTORY_SEPARATOR . 'LoaderCache.php';
if (file_exists($classFileIncCache)) { include_once $classFileIncCache; }
Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
*************
in this constellation the described problem occurs.

thanks for adding the requires.

Show
Master Surfer added a comment - I didn't use the resource plugins outside Zend_App. I added the following part to the application.ini: ************* resources.log.stream.writerName = "Stream" resources.log.stream.writerParams.stream = APPLICATION_PATH "/../data/logs/application.log" resources.log.stream.writerParams.mode = "a+" resources.log.stream.filterName = "Priority" resources.log.stream.filterParams.priority = 5 ************* and in the index.php the loader-cache: ************* require_once 'Zend/Loader/PluginLoader.php'; $classFileIncCache = realpath(APPLICATION_PATH . '/../data/cache') . DIRECTORY_SEPARATOR . 'LoaderCache.php'; if (file_exists($classFileIncCache)) { include_once $classFileIncCache; } Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache); ************* in this constellation the described problem occurs. thanks for adding the requires.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: