Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC_CheckError 周りを諸々改修 #1157

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
FIND_FILE 他の規則同様にエラーメッセージに表示名を出力する
ファイルパスをログ出力しようかと思ったが、この規則は本体で利用されていない様子なので一旦オミット
seasoftjapan committed Jan 21, 2025
commit eed7e07061bfb5a1c8260871f893431dbe1289b8
2 changes: 1 addition & 1 deletion data/class/SC_CheckError.php
Original file line number Diff line number Diff line change
@@ -1166,7 +1166,7 @@ public function FIND_FILE($value)
$path = str_replace('//', '/', $path);

if ($this->arrParam[$keyname] != '' && !file_exists($path)) {
$this->arrErr[$keyname] = "{$path}が見つかりません。<br />";
$this->arrErr[$keyname] = "{$disp_name}が見つかりません。<br />";
}
}

2 changes: 1 addition & 1 deletion tests/class/SC_CheckError/SC_CheckError_FIND_FILETest.php
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public function testFINDFILE()
public function testFINDFILEWithNotfound()
{
$this->fileName = 'test.JPG';
$this->expected = ''.$this->targetDir.'test.JPGが見つかりません。<br />';
$this->expected = ''.$this->target_func.'が見つかりません。<br />';

$this->scenario();
$this->verify();
2 changes: 1 addition & 1 deletion tests/class/SC_FormParamTest.php
Original file line number Diff line number Diff line change
@@ -482,7 +482,7 @@ public function testCheckErrorWithArrCheck()
'EXIST_CHECK_key' => '※ EXIST_CHECKが入力されていません。',
'FILE_EXISTS_key' => '※ FILE_EXISTSのファイルが存在しません。',
'FILE_NAME_CHECK_BY_NOUPLOAD_key' => '※ FILE_NAME_CHECK_BY_NOUPLOADのファイル名には、英数字、記号(_ - .)のみを入力して下さい。',
'FIND_FILE_key' => '50/\aが見つかりません',
'FIND_FILE_key' => 'FIND_FILEが見つかりません',
'GRAPH_CHECK_key' => '※ GRAPH_CHECKは英数記号で入力してください。',
'IP_CHECK_key' => '※ IP_CHECKに正しい形式のIPアドレスを入力してください。',
'KANA_CHECK_key' => '※ KANA_CHECKはカタカナで入力してください。',