« Previous | Next » 

Revision 106f6783

ID106f67839d4c8d5a0613bd0fb676f1c59684c06b
Parent 083be4a3
Child e4b6cdbc

Added by Sebastian Kurfuerst over 7 years ago

[BUGFIX] Throw helpful exception if ViewHelper class can't be resolved

This adds some case sensitive checks for the resolved ViewHelper
class name in order to prevent misleading fatal errors.

Background:

Previously, if the user mis-spelled a ViewHelper, e.g. by typing
``<f:format.textField>`` instead of ``<f:format.textfield>``, the system
failed with a fatal error of the following form::

Fatal error: Call to a member function getMethodParameters() on a non-object
in .../Core/ViewHelper/AbstractViewHelper.php on line 349

The cause of this error is that the reflection service was not properly
injected into the ViewHelper, which happens because the class loader of Flow
loads the non-instrumented class instead of the instrumented one.

This, in turn, happens because ``Data/Temporary/.../AvailableProxyClasses.php``
(which was introduced in Ie09b4e8891b61b33fd9bba3627a8312be02b1486) contains
only correctly-spelled class names; making the classloader believe that it
is not responsible for the ViewHelper.

Change-Id: I52986c7674f6266c0e9d42fadac6f428185bb6ff
Fixes: FLOW-152
Releases: master, 2.3, 2.2

  • added
  • modified
  • copied
  • renamed
  • deleted