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 possible Compile Error in delivery loop #2121

Merged
merged 1 commit into from Apr 22, 2016

Conversation

Projects
None yet
1 participant
@gillesbourgeat
Copy link
Member

gillesbourgeat commented Apr 22, 2016

The commit d10b200#diff-d3196da344bbf3793887daa43510e729R22 create an possible Compile Error

FatalErrorException in Delivery.php line 22:
Compile Error: Cannot use Thelia\Model\Cart as Cart because the name is already in use
in Delivery.php line 22
at DebugClassLoader->loadClass() in TheliaLoop.php line 394
at spl_autoload_call() in TheliaLoop.php line 394
at ReflectionClass->__construct() in TheliaLoop.php line 394
at TheliaLoop->createLoopInstance() in TheliaLoop.php line 150
at TheliaLoop->theliaLoop() in smarty_internal_templatebase.php(157) : eval()'d code line 530
at content_5719d880ccfcc7_92844936() in smarty_internal_templatebase.php line 188
at Smarty_Internal_TemplateBase->fetch() in SmartyParser.php line 371
at SmartyParser->internalRenderer() in SmartyParser.php line 395
at SmartyParser->render() in ViewListener.php line 69
at ViewListener->onKernelView() in EventDispatcher.php line 181
at call_user_func:{/Users/etienne/Sites/johana-s-garden/vendor/symfony/event-dispatcher/EventDispatcher.php:181}() in EventDispatcher.php line 181
at EventDispatcher->doDispatch() in EventDispatcher.php line 46
at EventDispatcher->dispatch() in HttpKernel.php line 144
at HttpKernel->handleRaw() in HttpKernel.php line 62
at HttpKernel->handle() in TheliaHttpKernel.php line 76
at TheliaHttpKernel->handle() in ParamInitMiddleware.php line 87
at ParamInitMiddleware->handle() in SessionMiddleware.php line 80
at SessionMiddleware->handle() in StackedHttpKernel.php line 23
at StackedHttpKernel->handle() in Kernel.php line 185
at Kernel->handle() in index_dev.php line 36
at {main}() in index_dev.php line 0

The class /Thelia\Model\Cart it conflicts with Thelia\Core\Template\Loop\Cart.

Another error occurs if the client is not connected.

FatalErrorException in Delivery.php line 65:
Error: Call to a member function getCountry() on null
in Delivery.php line 65
at Delivery->parseResults() in BaseLoop.php line 528
at BaseLoop->exec() in TheliaLoop.php line 154
at TheliaLoop->theliaLoop() in da574db33ed1df5be309266c63020d277012e954.file.cart.html.php line 530
at content_5719dd7ad31d30_76950908() in smarty_internal_templatebase.php line 188
at Smarty_Internal_TemplateBase->fetch() in SmartyParser.php line 371
at SmartyParser->internalRenderer() in SmartyParser.php line 395
at SmartyParser->render() in ViewListener.php line 69
at ViewListener->onKernelView() in EventDispatcher.php line 181
at call_user_func:{/Users/etienne/Sites/johana-s-garden/vendor/symfony/event-dispatcher/EventDispatcher.php:181}() in EventDispatcher.php line 181
at EventDispatcher->doDispatch() in EventDispatcher.php line 46
at EventDispatcher->dispatch() in HttpKernel.php line 144
at HttpKernel->handleRaw() in HttpKernel.php line 62
at HttpKernel->handle() in TheliaHttpKernel.php line 76
at TheliaHttpKernel->handle() in ParamInitMiddleware.php line 87
at ParamInitMiddleware->handle() in SessionMiddleware.php line 80
at SessionMiddleware->handle() in StackedHttpKernel.php line 23
at StackedHttpKernel->handle() in Kernel.php line 185
at Kernel->handle() in index_dev.php line 36
at {main}() in index_dev.php line 0

To correct this problem, the default country is injected if the customer has not selected a country

@gillesbourgeat gillesbourgeat added this to the 2.3.0 milestone Apr 22, 2016

@gillesbourgeat gillesbourgeat merged commit 7b64247 into thelia:master Apr 22, 2016

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment