Merge branch 'master' into loops
Conflicts: core/lib/Thelia/Core/Template/Loop/Category.php core/lib/Thelia/Core/Template/Loop/FeatureValue.php core/lib/Thelia/Core/Template/Loop/Folder.php core/lib/Thelia/Core/Template/Loop/Product.php core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php install/faker.php
This commit is contained in:
7
documentation/api/files/Core/HttpFoundation/Request.php.txt
Normal file → Executable file
7
documentation/api/files/Core/HttpFoundation/Request.php.txt
Normal file → Executable file
@@ -24,8 +24,8 @@ namespace Thelia\Core\HttpFoundation;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request as BaseRequest;
|
||||
|
||||
|
||||
class Request extends BaseRequest{
|
||||
class Request extends BaseRequest
|
||||
{
|
||||
|
||||
public function getProductId()
|
||||
{
|
||||
@@ -45,7 +45,8 @@ class Request extends BaseRequest{
|
||||
if ('' == $this->getQueryString()) {
|
||||
$additionalQs = '?'. ltrim($additionalQs, '&');
|
||||
}
|
||||
|
||||
return $uri . $additionalQs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
4
documentation/api/files/Core/HttpFoundation/Session/Session.php.txt
Normal file → Executable file
4
documentation/api/files/Core/HttpFoundation/Session/Session.php.txt
Normal file → Executable file
@@ -120,7 +120,7 @@ class Session extends BaseSession
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @throws \Thelia\Exception\InvalidCartException
|
||||
*/
|
||||
protected function verifyValidCart(Cart $cart)
|
||||
@@ -128,7 +128,7 @@ class Session extends BaseSession
|
||||
$customer = $this->getCustomerUser();
|
||||
if ($customer && $cart->getCustomerId() != $customer->getId()) {
|
||||
throw new InvalidCartException("customer in session and customer_id in cart are not the same");
|
||||
} else if($customer === null && $cart->getCustomerId() !== null) {
|
||||
} elseif ($customer === null && $cart->getCustomerId() !== null) {
|
||||
throw new InvalidCartException("Customer exists in cart and not in session");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user