[TEP-COMMIT] [CVS catalog] set the variables in the $GLOBALS scope due to a possible bug with PHP

anonymous-OfajU3CKLf1/[email protected] 13 Jun 2004 17:27:12 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Commit in catalog/catalog/includes/modules/services on MAIN

session.php +10 -10 1.1 -> 1.2

set the variables in the $GLOBALS scope due to a possible bug with PHP

related PHP bug report:

http://bugs.php.net/bug.php?id=28352

----------

catalog /catalog /includes /modules /services

session.php 1.1 -> 1.2

diff -u -r1.1 -r1.2
--- session.php 2004/04/13 08:02:18 1.1
+++ session.php 2004/06/13 17:27:09 1.2
@@ -110,28 +110,28 @@

// create an instance of the shopping cart
if ($osC_Session->exists('cart')) {

- $cart =& $osC_Session->value('cart');

+ $GLOBALS['cart'] =& $osC_Session->value('cart');

} else {

- $cart = new shoppingCart;
- $osC_Session->set('cart', $cart);

+ $GLOBALS['cart'] = new shoppingCart;
+ $osC_Session->set('cart', $GLOBALS['cart']);

}

// create an instance of the customer class
if ($osC_Session->exists('osC_Customer')) {

- $osC_Customer =& $osC_Session->value('osC_Customer');

+ $GLOBALS['osC_Customer'] =& $osC_Session->value('osC_Customer');

} else {

- $osC_Customer = new osC_Customer;
- $osC_Session->set('osC_Customer', $osC_Customer);

+ $GLOBALS['osC_Customer'] = new osC_Customer;
+ $osC_Session->set('osC_Customer', $GLOBALS['osC_Customer']);

}

// navigation history
if ($osC_Session->exists('navigation')) {

- $navigation =& $osC_Session->value('navigation');

+ $GLOBALS['navigation'] =& $osC_Session->value('navigation');

} else {

- $navigation = new navigationHistory;
- $osC_Session->set('navigation', $navigation);

+ $GLOBALS['navigation'] = new navigationHistory;
+ $osC_Session->set('navigation', $GLOBALS['navigation']);

}

- $navigation->add_current_page();

+ $GLOBALS['navigation']->add_current_page();

// add messages in the session to the message stack
$messageStack->loadFromSession();

CVSspam 0.2.8

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504