Bug #7417

Missleading exception on wrong data type

Added by Felix Oertel over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-04-22
Priority:Must have Due date:
Assigned To:- % Done:

100%

Category:Core
Target version:-
Has patch: Affected Flow version:

Description

hi,

in a viewhelper I annotated an argument "array" but throw in an object. The missleading exception
@@
was thrown.

In Core/ViewHelper/AbstractViewHelper.php:295 validateArguments() tries to throw an "wrong type"-exception but generates a new exception itself by calling strval($this->arguments[$argumentName]).

We should only output the argument's value if it's a human readable type though skipping objects and arrays.

fluid_issue_7417.diff Magnifier - solving patch (against FLOW3 SVN) (1 kB) Christian Müller, 2010-05-28 09:45

Associated revisions

Revision 73636b51
Added by Sebastian Kurfuerst about 5 years ago

[+BUGFIX] Fluid (Core): Fixed misleading exception. Resolves #7417.

History

#1 Updated by Christian Müller about 5 years ago

Felix Oertel wrote:

hi,

in a viewhelper I annotated an argument "array" but throw in an object. The missleading exception
@@
was thrown.

In Core/ViewHelper/AbstractViewHelper.php:295 validateArguments() tries to throw an "wrong type"-exception but generates a new exception itself by calling strval($this->arguments[$argumentName]).

We should only output the argument's value if it's a human readable type though skipping objects and arrays.

Attached patch (against FLOW3 SVN) removes the "Value of argument:" sentence completely and strval is not called.

#2 Updated by Sebastian Kurfuerst about 5 years ago

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

Applied in changeset r4508.

Also available in: Atom PDF