[Tep-j-general] Credit Class & Gift Voucher(CCGV) 5.13をOSCJ 2.2 ms1に入れたときのWarning

アーカイブの一覧に戻る

Kiyoshi Shigenaga WBD kiyos****@web-b*****
2005年 5月 14日 (土) 12:17:30 JST


いつも拝見させていただいております。Shigenagaと申します。

Credit Class & Gift Voucher(CCGV)
http://www.oscommerce.com/community/contributions,282

現在の最新パッケージをOSCJ 2.2 ms1にいれてみました。
22 Apr 2005 - Full package 5.13(OSC 2.2 ms2)

機能自体は正常に動いているようなのですが、catalog/shopping_cart.phpのページで、以下のようなWarningが出てしまいます。OSC 2.2 ms2向けとかかれているので、このあたりに問題があるので 
はないかと思います。出ているエラーは以下の通りです。

Warning: Variable passed to each() is not an array or object in 
/home/*****/domains/*****/public_html/catalog/shopping_cart.php on line 68

問題の68行目には、以下のようにかかれており
while (list($option, $value) = each($products[$i]['attributes'])) {


さらに、
Warning: reset(): Passed variable is not an array or object in 
/home/*****/domains/*****/public_html/catalog/includes/modules/order_details.php 
on line 83

Warning: Variable passed to each() is not an array or object in 
/home/*****/domains/*****/public_html/catalog/includes/modules/order_details.php 
on line 84

Warning: reset(): Passed variable is not an array or object in 
/home/*****/domains/*****/public_html/catalog/includes/modules/order_details.php 
on line 105

Warning: Variable passed to each() is not an array or object in 
/home/*****/domains/*****/public_html/catalog/includes/modules/order_details.php 
on line 106


というWarningがでています。
Line83
      reset($products[$i]['attributes']);
Line84
      while (list($option, $value) = each($products[$i]['attributes'])) {

Line105
      reset($products[$i]['attributes']);
Line106
      while (list($option, $value) = each($products[$i]['attributes'])) {

見た限りでは、$products[$i]['attributes']に問題と思われるのですが、PHPに知識があまりない為、具体的な解決方法がわかりません。過去ログや英語のログも読みあさって、古いバージョン(5.06)なら動いているという書き込みをみました。ただできれば新しいほうがバグも少なくなっていると思いますので、あえて挑戦しました。
3日ほどがんばってみたのですがよい解決方法が見つからないため、こちらに書き込みました。
よろしくお願い致します。

Shigenaga 




Tep-j-general メーリングリストの案内
アーカイブの一覧に戻る