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.



Joined: 08/07/2007