OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: HELP: Paypal IPN : Function Reset not an array or object
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > General Support
gpigate
Store is set up and everything works fine. Add item to cart, checkout and everything is fine. Go to paypal, enter information make payment and everything is fine.

Click on button to return to the store and it blows up with these errors.


QUOTE
Warning: reset() [function.reset]: Passed variable is not an array or object in /shop/includes/classes/navigation_history.php on line 130

Warning: Variable passed to each() is not an array or object in /shop/includes/classes/navigation_history.php on line 131

Warning: reset() [function.reset]: Passed variable is not an array or object in /shop/includes/classes/navigation_history.php on line 130

Warning: Variable passed to each() is not an array or object in /shop/includes/classes/navigation_history.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /shop/includes/classes/navigation_history.php:130) in /shop/includes/functions/general.php on line 36


Navigation History

function filter_parameters($parameters) {
$clean = array();

reset($parameters); <------- LINE 130
while (list($key, $value) = each($parameters)) {
if (strpos($key, '_nh-dns') < 1) {
$clean[$key] = $value;
}
}

return $clean;
}

General

function tep_redirect($url) {
// EOF Product Type Option

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}

header('Location: ' . $url); <------- Line 36

tep_exit();
}


The order is placed fine and is in the preparing IPN status. I am not sure the IPN is working fully. The customer can not return to my store without errors.

PLEASE HELP!!!!!!!!!!!!
gpigate
would it help if I had 50$ for the first person to help me resolve this? not a newb here, can hold my own with php and everything else but I can not seem to find the root of this one. i have searched many times on here and have tried some things to no avail
tys_ust
(backup the file before you made change)

try to replace:

if (is_array($parameters)) {
reset($parameters);
while (list($key, $value) = each($parameters)) {
if (strpos($key, '_nh-dns') < 1) {
$clean[$key] = $value;
}
}
}


with:

reset($parameters); <------- LINE 130
while (list($key, $value) = each($parameters)) {
if (strpos($key, '_nh-dns') < 1) {
$clean[$key] = $value;
}
}


in navigation_history.php file
tys_ust
Sorry, should be:

replace


reset($parameters); <------- LINE 130
while (list($key, $value) = each($parameters)) {
if (strpos($key, '_nh-dns') < 1) {
$clean[$key] = $value;
}
}


with


if (is_array($parameters)) {
reset($parameters);
while (list($key, $value) = each($parameters)) {
if (strpos($key, '_nh-dns') < 1) {
$clean[$key] = $value;
}
}
}


in navigation_history.php file
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.