ZF-7233: Zend_InfoCard_Exception_Abstract declared twice in Zend/InfoCard/Exception.php


Zend_InfoCard_Exception_Abstract declared twice: {quote} if (class_exists("Zend_Exception")) { abstract class Zend_InfoCard_Exception_Abstract extends Zend_Exception { } } else { abstract class Zend_InfoCard_Exception_Abstract extends Exception { } } {quote}

Proposed substitution: {quote} if (!class_exists("Zend_Exception")) { require_once 'Zend/Exception.php'; }

abstract class Zend_InfoCard_Exception_Abstract extends Zend_Exception { } {quote}


This is intentional, as the Zend_InfoCard component is shipped separately from Zend Framework as a whole and thus the Zend_Exception class is not always available.

Well, but this is currently against the coding standard, and Zend_Infocard could, just like the other standalone package Zend_Amf, ship Zend_Exception with it.

Also Zend_Gdata is shipped as standalone package with Zend_Exception and does not use such a switch.

I agree with Ben on this. Shipping Zend_Exception with Zend_InfoCard does neither hurt performance nor add significant size to the download, and keeping consistence with the other standalone component can't be too bad either. Violating the CS for something as trivial as an Exception class ain't worth it imho.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.