Re: Disable Product - Price, Add to Cart, Wishlist

albies's picture
Offline
Joined: 01/02/2008
Juice: 90
Re: Disable Product - Price, Add to Cart, Wishlist

version for drupal 6 with php5 make an error of reference

I not know if is correct but in this rows I removed & first of variables

row 34
uc_disable_product_schema_alter(&$new_schema);
row 36
db_add_field(&$ret, 'uc_products', $name, $spec);
row 47
uc_disable_product_schema_alter(&$new_schema);
row 49
db_drop_field(&$ret, 'uc_products', $name);

is sufficient or also insert other codes? example some unset etc ?(see bottom)
-------------------------------------------------------------------------------------------------------------------------------------------

*** by php manual
After hours of confusion and reading tons of posts I finally figured out that replacing PHP 4 style object creation, where new is assigned by reference:

$node_obj =& new someClass($somearg, $moreargs);

which in PHP 5.3.0 generates an E_STRICT message telling you that "Assigning the return value of new by reference is deprecated"

with the following, where & has been removed:

$node_obj = new someClass($somearg, $moreargs);

in some cases (at least in recursive loops while creating a tree of nodes containing child nodes) requires

unset($node_obj);

before the actual object assignment line to avoid all child nodes becoming identical.

Disable Product - Price, Add to Cart, Wishlist By: webmasterkai (47 replies) Fri, 07/18/2008 - 12:45