Bug #3415

Sorting of $classNamesToReflect in the reflection Service might cause PHP error

Added by Irene Höppner over 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Could have
Category:
Reflection
Start date:
2009-05-22
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

In the method F3\FLOW3\Reflection\reflectEmergedClasses() the $classNamesToReflect-array is being sorted before it's being traversed.

Thus packages like FLOW3CGL are reflected before the FLOW3 package (i guess that's the reason..). If these "earlier" packages are buggy, they don't run into an exception, but cause a PHP Error:

"PHP Fatal error: Class 'F3\\FLOW3\\Error\\Exception' not found in /var/www/FLOW3/Packages/Local/FLOW3CGL/Classes/Model/MessageQueue.php on line 78"

Associated revisions

Revision bd715808 (diff)
Added by Karsten Dambekalns over 10 years ago

[+BUGFIX] FLOW3 (Error): When an error is caught by the error handler the FLOW3 exception class is used only if available (otherwise the builtin PHP exception is used), fixes #3415.
[~TASK] FLOW3 (Error): some cleanup in DebugExceptionHandler and ProductionExceptionHandler.

History

#1 Updated by Karsten Dambekalns over 10 years ago

  • Category set to Reflection
  • Assignee set to Robert Lemke
  • Target version set to 283

This needs to be checked...

#2 Updated by Robert Lemke over 10 years ago

  • Priority changed from Should have to Must have

#3 Updated by Robert Lemke over 10 years ago

  • Target version deleted (283)

#4 Updated by Robert Lemke over 10 years ago

  • Status changed from New to Accepted
  • Priority changed from Must have to Could have
  • Target version set to 1.0 alpha 3

#5 Updated by Robert Lemke over 10 years ago

  • Target version deleted (1.0 alpha 3)

#6 Updated by Karsten Dambekalns over 10 years ago

  • Assignee changed from Robert Lemke to Karsten Dambekalns
  • Target version set to 1.0 alpha 5

#7 Updated by Karsten Dambekalns over 10 years ago

While the order of things plays a role here, it's not about the classnames. It's the fact that the FLOW3 exception class has not been loaded, which is something that could probably happen due to a variety of reasons. Thus the possible solution of making sure that class is loaded as early as possible seems still to be error prone.

I'll go for using the builtin PHP exception class in the error handler if the FLOW3 exception is unavailable.

#8 Updated by Karsten Dambekalns over 10 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3214.

Also available in: Atom PDF