Zend Framework

redundant class name information within error messages

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.10.4
  • Fix Version/s: 1.10.5
  • Component/s: Zend_Form
  • Labels:
    None

Description

When Zend_Form throws an exception, it inserts twice the class name within error message.

see the following error message generated by Zend_Form:

Exception information:

Message: Zend_Form::Zend_Form::isValid expects an arrayencounters a problem, it

Class Zend_Form is displayed twice because of this code:

throw new Zend_Form_Exception(_CLASS_ . '::' . _METHOD_ . ' expects an array');

Magic constants _METHOD_ already contains '_CLASS_::' therefore prepending it creates a duplicate class name.

Example:
class A {
public function b() { return __METHOD__; }
}

$a = new A();
echo $a->b(); // output: A::b

Activity

Hide
Christian Albrecht added a comment -

Fixed in trunk r22126 and merged into 1.10 release branch.

Show
Christian Albrecht added a comment - Fixed in trunk r22126 and merged into 1.10 release branch.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: