Bug #7417

Missleading exception on wrong data type

Added by Felix Oertel over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Core
Target version:
-
Start date:
2010-04-22
Due date:
% Done:

100%

Estimated time:
Has patch:

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.


Files

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

Updated by Christian Müller over 11 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 over 11 years ago

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

Applied in changeset r4508.

Also available in: Atom PDF