Bug #3415

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

Added by Irene Höppner about 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-05-22
Priority:Could have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Reflection
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 5
PHP Version: Complexity:
Has patch: Affected Flow version:

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
Added by Karsten Dambekalns almost 6 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 about 6 years ago

  • Category set to Reflection
  • Assigned To set to Robert Lemke
  • Target version set to 283

This needs to be checked...

#2 Updated by Robert Lemke about 6 years ago

  • Priority changed from Should have to Must have

#3 Updated by Robert Lemke about 6 years ago

  • Target version deleted (283)

#4 Updated by Robert Lemke about 6 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 almost 6 years ago

  • Target version deleted (1.0 alpha 3)

#6 Updated by Karsten Dambekalns almost 6 years ago

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

#7 Updated by Karsten Dambekalns almost 6 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 almost 6 years ago

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

Applied in changeset r3214.

Also available in: Atom PDF