顧客情報CSVエクスポートでのエラー 投稿する

投稿者:s_sato  投稿日時:2022-08-30 12:27:29
顧客情報CSVエクスポートで出力しようとしたところ、次のようなエラーが出ました。

Fatal error: Uncaught TypeError: Argument 1 passed to SOYShop_Area::getAreaText() must be of the type int, string given, called in
/home/***/www/***/soyshop/webapp/src/domain/user/SOYShop_User.class.php on line 742 and defined in
/home/***/www/***/soyshop/webapp/src/domain/config/SOYShop_Area.class.php:96 Stack trace: #0
/home/***/www/***/soyshop/webapp/src/domain/user/SOYShop_User.class.php(742): SOYShop_Area::getAreaText('') #1
/home/***/www/***/soyshop/webapp/src/logic/user/ExImportLogic.class.php(133) : eval()'d code(21): SOYShop_User->getJobAreaText() #2
/home/***/www/***/soyshop/webapp/src/logic/user/ExImportLogic.class.php(133): eval() #3
/home/***/www/***/soyshop/webapp/src/logic/user/ExImportLogic.class.php(18): ExImportLogic->{closure}(Object(SOYShop_User), Array, Array) #4
/home/***/www/***/soyshop/webapp/pages/User/ExportPage.class.php(171): ExImportLogic->export(Object(SOYShop_User)) #5
/home/***/www/***/so in /home/***/www/***/soyshop/webapp/src/domain/config/SOYShop_Area.class.php on line 96

soycms 3.6.7
soyshop 2.6.0
PHP 7.4.30です。
よろしくお願いします。
投稿者:齋藤毅  投稿日時:2022-08-30 15:16:33
/home/***/www/***/soyshop/webapp/src/domain/user/SOYShop_User.class.php
の433行目付近にある
function getJobArea() {
	return $this->jobArea;
}

function getJobArea() {
	return (is_numeric($this->jobArea)) ? (int)$this->jobArea : -1;
}
にすると解決するはずです。
投稿者:s_sato  投稿日時:2022-08-31 08:53:59
ありがとうございます!エラーが消えました!
ログインして投稿する