I can't install Klarna payment module on 2.3.4.. It works fine on 2.3.1,but can anyone give some hint what has changed in modules from 2.3.1 to 2.3.4, so I could try to find the issue ? Klarna support didn't have any solution :(
The error the install script gives is:
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /home/vertical/public_html/catalog/includes/classes/klarna/class.KlarnaUtils.php on line 1519
And the code is (I have marked the error line in bold):
public function installModule($configuration) { $default = $this->getDefaultArray(); tep_db_query( 'CREATE TABLE IF NOT EXISTS `klarna_ordernum` ('. '`orders_id` INT NOT NULL , '. '`klarna_ref` VARCHAR( 50 ) NOT NULL , '. 'UNIQUE ( `orders_id` ), '. 'FOREIGN KEY ( `orders_id` ) REFERENCES ' . TABLE_ORDERS . ' ( `orders_id` )' . ');' ); foreach ($configuration as $config) { $merged = array_merge($default, $config); $query_string = implode(', ', array_keys($merged)); $query_values = implode( '", "', array_map( "mysqli_real_escape_string", array_values($merged) ) ); tep_db_query( "INSERT INTO ". TABLE_CONFIGURATION . "({$query_string}) VALUES (\"{$query_values}\")" ); } } /** * Get the default array for installation method. * * @@Return array with default values */ public function getDefaultArray() { return array( 'configuration_title' => 'null', 'configuration_key' => 'null', 'configuration_value' => '', 'configuration_description' => 'null', 'configuration_group_id' => 'null', 'sort_order' => 'null', 'use_function' => '', 'set_function' => '', 'date_added' => 'now()' ); }