Reference to wrong / non-existing class #11581
Labels
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
Preconditions
Steps to reproduce
Magento\Sales\Model\Order\Pdf\Invoice::getPdf
comment out the call to$this->insertOrder(
Expected result
Actual result
Zend_Pdf_Color_RGB
is not found in the_drawHeader
method.Additional info
This happens because the actual class name is
Zend_Pdf_Color_Rgb
(lowercase g and b).The fact that it works is just an accident. It's because that's how the php autoloader works. The correct class name is referenced in a method called above the
_drawHeader
and the correct file is found. The second time the class is called the class is already loaded and since the class names are not case sensitive .... you get where this is going.Same goes for creditmemo and shipping print. I guess copy/paste.
The text was updated successfully, but these errors were encountered: