Skip to content
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

Fix: Object of class DateTime could not be converted to string #2813

Merged
merged 1 commit into from
Jun 6, 2015

Conversation

umpirsky
Copy link
Contributor

@umpirsky umpirsky commented Jun 5, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
License MIT

When coupon has expiresAt date set, this error may occur:

Error: Object of class DateTime could not be converted to string

…//vendor/doctrine/dbal/lib/Doctrine/DBAL/
Connection.php (694)
…81352/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/
SingleSelectExecutor.php (50)
/vendor/doctrine/orm/lib/Doctrine/ORM/
Query.php (286)
…/vendor/doctrine/orm/lib/Doctrine/ORM/
AbstractQuery.php (794)
…/vendor/doctrine/orm/lib/Doctrine/ORM/
AbstractQuery.php (646)
…/vendor/doctrine/orm/lib/Doctrine/ORM/
AbstractQuery.php (674)
…or/sylius/sylius/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/
OrderRepository.php (198)
…us/src/Sylius/Component/Core/Promotion/Checker/
PromotionEligibilityChecker.php (102)
…us/src/Sylius/Component/Core/Promotion/Checker/
PromotionEligibilityChecker.php (97)
…us/src/Sylius/Component/Core/Promotion/Checker/
PromotionEligibilityChecker.php (67)
…/sylius/src/Sylius/Component/Promotion/Checker/
PromotionEligibilityChecker.php (90)
...

This happens because we cast coupon to array in order repository.

@michalmarcinkowski
Copy link
Contributor

👍

pjedrzejewski pushed a commit that referenced this pull request Jun 6, 2015
Fix: Object of class DateTime could not be converted to string
@pjedrzejewski pjedrzejewski merged commit 191ba60 into master Jun 6, 2015
@pjedrzejewski
Copy link
Member

Thank you Sasha!

@pjedrzejewski pjedrzejewski deleted the fix/coupon-datetime branch January 13, 2016 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants