Jump to content

error on updating module confige on 1.5


Recommended Posts

hello

when i updating my module configuration on 1.5 i catch this error

Warning

: Invalid argument supplied for foreach() in

 

/Applications/MAMP/htdocs/prestashop1.5/classes/controller/AdminController.php on line875

 

 

i can't understant what is this warning this warning is not from my module code in prestashop core file

 

help me!!!!!!!!

 

this is my update code

public function getContent()
 {

  if (Tools::isSubmit('submitOptions')){
$this->_handleOptions();
 }
  return $this->_displayForm();
 }

private function _displayForm()
 {
  global $smarty, $cookie;
  $options = $this->getBackToTopOption();

  $smarty->assign('easinglist', array(
  'linear',
  'swing',
  'jswing',
  'easeInQuad',
  'easeOutQuad',
  'easeInOutQuad',
  'easeInCubic',
  'easeOutCubic',
  'easeInOutCubic',
  'easeInQuart',
  'easeOutQuart',
  'easeInOutQuart',
  'easeInQuint',
  'easeOutQuint',
  'easeInOutQuint',
  'easeInSine',
  'easeOutSine',
  'easeInOutSine',
  'easeInExpo',
  'easeOutExpo',
  'easeInOutExpo',
  'easeInCirc',
  'easeOutCirc',
  'easeInOutCirc',
  'easeInElastic',
  'easeOutElastic',
  'easeInOutElastic',
  'easeInBack',
  'easeOutBack',
  'easeInOutBack',
  'easeInBounce',
  'easeOutBounce',
  'easeInOutBounce'
  ));
  $smarty->assign('backtotop', array(
'options' => array(
 'text' => $options['text'],
 'min' => $options['min'],
 'indelay' => $options['indelay'],
 'outdelay' => $options['outdelay'],
 'scrollspeed' => $options['scrollspeed'],
 'easingtype' => $options['easingtype']
),  
  'postAction' => 'index.php?controller=adminmodules&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.$this->tab.'&module_name='.$this->name.'',
  ));
  return $this->display(__FILE__, 'views/templates/hooks/admin.tpl');
 }


 private function _handleOptions()
 {
  global $smarty;
if (!Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'arimeri_option_backtotop` SET
 `text` = "'.Tools::getValue('text').'",
 `min` = "'.(int)Tools::getValue('min').'",
 `indelay` = "'.(int)Tools::getValue('indelay').'",
 `outdelay` = "'.(int)Tools::getValue('outdelay').'",
 `scrollspeed` = "'.(int)Tools::getValue('scrollspeed').'",	
 `easingtype` = "'.Tools::getValue('easingtype').'"
 ')){
$errors[0] = $this->displayError($this->l('An error occurred while saving data. I\'m sure this is a DataBase error.'));
$smarty->assign('errors', $errors);
return false;
  }
 $smarty->assign('confirmation', $this->l('Options saved.'));
 }

Edited by arasheb (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...