LooInSpain Posted October 24, 2007 Posted October 24, 2007 I have just set up the PayPal module on my osCommerce site. Everything has been set up on PayPal and the payment gateway is routed to the sandbox. Eveything works fine, the payment needed is passed to Paypal as required, the problem does not happen until the customer is passed back to the Merchant, when they receive these errors: Warning: reset() [function.reset]: Passed variable is not an array or object in /home/coachin2/public_html/bookings/includes/classes/navigation_history.php on line 130 Warning: Variable passed to each() is not an array or object in /home/coachin2/public_html/bookings/includes/classes/navigation_history.php on line 131 Warning: reset() [function.reset]: Passed variable is not an array or object in /home/coachin2/public_html/bookings/includes/classes/navigation_history.php on line 130 Warning: Variable passed to each() is not an array or object in /home/coachin2/public_html/bookings/includes/classes/navigation_history.php on line 131 Warning: Cannot modify header information - headers already sent by (output started at /home/coachin2/public_html/bookings/includes/classes/navigation_history.php:130) in /home/coachin2/public_html/bookings/includes/functions/general.php on line 33 Can anyone help with this?
LooInSpain Posted October 25, 2007 Author Posted October 25, 2007 Please help, this is the last thing before the site is live. Below are lines 127 - 138, line 130 and 131 (reset($parameters); while (list($key, $value) = each($parameters)) { ) are the ones causing the problem apparently. function filter_parameters($parameters) { $clean = array(); reset($parameters); while (list($key, $value) = each($parameters)) { if (strpos($key, '_nh-dns') < 1) { $clean[$key] = $value; } } return $clean; } Any help would be fantastic
Nullachtfuffzehn Posted October 25, 2007 Posted October 25, 2007 Apparently the variable $parameters is not an array as it is supposed to be. You may check how the variable is set in application_top.php.
LooInSpain Posted October 25, 2007 Author Posted October 25, 2007 Apparently the variable $parameters is not an array as it is supposed to be. You may check how the variable is set in application_top.php. In application_top.php the variable $parameters is set on lines 314-331: // Shopping cart actions if (isset($HTTP_GET_VARS['action'])) { // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled if ($session_started == false) { tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE)); } if (DISPLAY_CART == 'true') { $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } This is the same as the out of the box osCommerce. Is there a problem with it that you can see?
LooInSpain Posted October 26, 2007 Author Posted October 26, 2007 Has no one experienced this before??? At the moment the site is running through the PayPal sandbox, and until we have this working we cannot even think about going live. I've asked on the PayPal forum and they say it's an osCommerce problem, which it is, but am I the only one to ever see this error?
pandrews Posted November 15, 2007 Posted November 15, 2007 I've asked on the PayPal forum and they say it's an osCommerce problem, which it is, but am I the only one to ever see this error? no, i get the same error, and so does a lot of other people as ive found by searching the forum, but i cant find where anybody has ever given an answer..
satish Posted November 16, 2007 Posted November 16, 2007 Should be a problem related to Register global or register long arrays. Chek with this issue in mind. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Aussiepete Posted November 28, 2007 Posted November 28, 2007 I also get the same message when dealing with a different Payment Gateway - has there been a fix or solution found for this issue?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.