From uc_stock_skus in

Posts: 332
Joined: 08/07/2007
Administrator

From uc_stock_skus in uc_stock.module:

<?php
   
...
    if (
module_exists('uc_attribute')) {
     
$models = db_query("SELECT model FROM {uc_product_adjustments} WHERE nid = %d", $node->nid);
      while (
$model = db_fetch_object($models)) {
        if (!
in_array($model,$skus)) { //error occurs here
         
$skus[] = $model->model;
        }
      }
    }
    ...
?>

It looks like I had a typo in the in_array's 1st argument; it should be $model->model not $model. I guess my PHP setup is fine with using objects as the argument with in_array function. I've committed a patch to bazaar so that $model->model is used.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Stock level for certain sizes By: deanloh (9 replies) Fri, 02/22/2008 - 03:36