Skip to content

Reference to wrong / non-existing class #11581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tzyganu opened this issue Oct 20, 2017 · 4 comments
Closed

Reference to wrong / non-existing class #11581

tzyganu opened this issue Oct 20, 2017 · 4 comments
Assignees
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

Comments

@tzyganu
Copy link
Contributor

tzyganu commented Oct 20, 2017

Preconditions

  1. Magento version 2.2 (or previous)

Steps to reproduce

  1. In the method Magento\Sales\Model\Order\Pdf\Invoice::getPdf comment out the call to $this->insertOrder(
  2. Go to the backend and print an invoice

Expected result

  1. I should see the invoice without the order details

Actual result

  1. I get a fatal error because the class 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.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 20, 2017
@tzyganu tzyganu mentioned this issue Oct 20, 2017
4 tasks
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed 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 labels Oct 20, 2017
@magento-engcom-team
Copy link
Contributor

@tzyganu, thank you for your report.
We've created internal ticket(s) MAGETWO-82432 to track progress on the issue.

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-82428

okorshenko pushed a commit that referenced this issue Oct 28, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82954: Admin product search - Pressing enter does not submit #4696 #11827
 - MAGETWO-82953: Fix #11581: Reference to wrong / non-existing class #11830
 - MAGETWO-82887: X-Magento-Tags header containing whitespaces causes exception #11767
 - MAGETWO-82886: Improve error reporting for products images import. #11779
 - MAGETWO-82754: Magento setup:install interactive shell #11425
 - MAGETWO-81594: Issue #6924: Unmask exception message during product import #11363
@okorshenko
Copy link
Contributor

the issue has been fixed and delivered to 2.2-develop branch. Will be available with 2.2.2 release

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-82953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

5 participants