Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Compability.php


Alexian

Recommended Posts

Posted

I got an error in mine admin/includes/functions/compability.php

I have a new oscommerce snapshot...so the "fix"

reset($ar);

is already included in the file. This is the code:

 

////

// Recursively handle magic_quotes_gpc turned off.

// This is due to the possibility of have an array in

// $HTTP_xxx_VARS

// Ie, products attributes

function do_magic_quotes_gpc(&$ar) {

if (!is_array($ar)) return false;

 

reset($ar);

while (list($key, $value) = each($ar)) {

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

} else {

$ar[$key] = addslashes($value);

}

}

reset($ar);

}

 

but i get an error like this:

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/alex/domains/xxxxx/public_html/shop/admin/includes/functions/compatibility.php:18) in /home/alex/domains/xxxxx/public_html/shop/admin/includes/functions/compatibility.php on line 30

 

How do i solve this.. i couldnt find much for it

Posted
Solved it Please close topic

Glad you solved it, but can you please posta solution? It may help others in the futre.

Posted

I am getting exactly the same error. Mine started after I changed the <div align="centre"> to <div align="left"> for the text "Your order has been processed etc...." ( how can changing a div statement cause a fatal error :'( ?)

I have tried copying up a new copy of the checkout_success.php file but I still get the same error. Orders are processed but I would like to know the fix please.

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...