Zend Framework

Zend_Application_Resource_Modules class_exists shouldn't try to load bootstrap class

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.0, 1.8.1, 1.8.2
  • Fix Version/s: 1.8.4
  • Component/s: Zend_Application
  • Labels:
    None

Description

On line 71, Zend_Application_Resource_Modules checks if the bootstrap class for a specific module is loaded using class_exists. However, the second argument for class_exists isn't set to false. The result is that the autoloader will try to load the bootstrap class automatically. This is not desirable if you don't want to create a bootstrap class for your modules. Also, the resource seems to already be setup to try and load the class if it's not loaded already. Suggested fix:

Change:

if (!class_exists($bootstrapClass)) {

To:

if (!class_exists($bootstrapClass, false)) {

Activity

Hide
Jurrien Stutterheim added a comment -

Resolved in r16155 and merged to release-1.8 in r16156

Show
Jurrien Stutterheim added a comment - Resolved in r16155 and merged to release-1.8 in r16156
Hide
Miroslav Kubelik added a comment -

I think this partially solves ZF-6658.

Maybe same problem with class_exists is in ZF-6672, can you please reassign and fix ZF-6672 also?

Show
Miroslav Kubelik added a comment - I think this partially solves ZF-6658. Maybe same problem with class_exists is in ZF-6672, can you please reassign and fix ZF-6672 also?
Hide
Chris Jones added a comment -

This fixes ZF-6707 also.

Show
Chris Jones added a comment - This fixes ZF-6707 also.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: