Jump to content

Amiral D.

Recommended Posts

I've made some debug to find the problem, i face what it seems to be a PHP issue :

On line 575 of classes/controllers/AdminController.php :

 
foreach ($_POST as $key => $value)
{
if ($value === '')
unset($this->context->cookie->{$prefix.$key});
elseif (stripos($key, $this->list_id.'Filter_') === 0)
$this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : serialize($value);
elseif (stripos($key, 'submitFilter') === 0)
$this->context->cookie->$key = !is_array($value) ? $value : serialize($value);
}
 
When i var_dump($this->context->cookie->{$prefix.$key}), it returns empty array values, assuming that $value is a date based array.
 
Do someone can help me on this ? 
Link to comment
Share on other sites

j'ai trouver cet solution :

 

On line 575 of classes/controllers/AdminController.php :

 

 

if (isset($this->list_id))

{

 

 

foreach ($_POST as $key => $value)

{

 

if($key=='orderFilter_a!date_add'){

continue;

}

if($key=='local_orderFilter_a!date_add'){

$key='orderFilter_a!date_add';

$valu= array();

foreach($value as $val){

$valu[]= implode('-', array_reverse(explode('/', $val)));

 

}

$value=$valu;

 

}

if ($value === '')

unset($this->context->cookie->{$prefix.$key});

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...