注文情報を編集時のエラー 投稿する
投稿者:s_sato
投稿日時:2026-09-24 10:33:33
注文詳細ページの備考欄を編集して保存しようとしたところ次のようなエラーが出ました。
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, false given in /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php:119 Stack trace: #0 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(5410): EditPage->doPost() #1 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(5397): WebPage->prepare() #2 /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php(465): WebPage->__construct() #3 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(4010): EditPage->__construct() #4 /home/***/www/***/soyshop/webapp/src/base/SOYShopPageController.class.php(101): SOY2HTMLFactory::createInstance() #5 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(241): SOYShopPageController->execute() #6 /home/***/www/***/soyshop/index.php(3): SOY2PageController::run() #7 {main} thrown in /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php on line 119
SOYCMS:3.25.5
SOY Shop:2.15.1
です。
対処方法がありましたらよろしくお願いいたします。
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, false given in /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php:119 Stack trace: #0 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(5410): EditPage->doPost() #1 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(5397): WebPage->prepare() #2 /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php(465): WebPage->__construct() #3 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(4010): EditPage->__construct() #4 /home/***/www/***/soyshop/webapp/src/base/SOYShopPageController.class.php(101): SOY2HTMLFactory::createInstance() #5 /home/***/www/***/soyshop/webapp/lib/soy2_build.min.php(241): SOYShopPageController->execute() #6 /home/***/www/***/soyshop/index.php(3): SOY2PageController::run() #7 {main} thrown in /home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.php on line 119
SOYCMS:3.25.5
SOY Shop:2.15.1
です。
対処方法がありましたらよろしくお願いいたします。
投稿者:齋藤毅
投稿日時:2026-09-24 11:38:30
/home/***/www/***/soyshop/webapp/pages/Order/EditPage.class.phpの119行目の
$orderAttributes = (count($itemOrder->getAttributeList()) > 0) ? $itemOrder->getAttributeList() : self::getOptionIndex();
を
$attrs = (is_array($itemOrder->getAttributeList())) ? $itemOrder->getAttributeList() : array();
$orderAttributes = (count($attrs) > 0) ? $attrs : self::getOptionIndex();
に変更するとエラーが消えるはずです
修正したバージョン(2.15.2以降)を下記URLからダウンロードできます
https://saitodev.co/soycms/soyshop/
投稿者:s_sato
投稿日時:2026-09-24 11:48:30
エラーが消えました。
ありがとうございます。
ありがとうございます。