mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add friendly help message for "unexpected end of file" errors (fix #2180)
This commit is contained in:
parent
31253cdb43
commit
ec4d5f07df
3 changed files with 3 additions and 0 deletions
|
|
@ -6,3 +6,4 @@ $lang->error_help['baseobject'] = 'Object → BaseObject conversion is required
|
|||
$lang->error_help['undef_constant'] = 'This error occurs because of missing "quotes". This syntax was often used in the past, but it is not allowed in recent versions of PHP. Please fix the incorrect syntax by consulting the file name and line number shown above.';
|
||||
$lang->error_help['undef_object'] = 'This code is trying to add an attribute to an undefined object. This coding style was often used in the past, but it is not allowed in recent versions of PHP. Please fix the incorrect code by consulting the file name and line number shown above.';
|
||||
$lang->error_help['not_array'] = 'This code is trying to use an array function on something that is not an array. This coding style was often used in the past, but it is not allowed in recent versions of PHP. Please fix the incorrect code by consulting the file name and line number shown above.';
|
||||
$lang->error_help['unexpected_eof'] = 'There is an unclosed parenthesis somewhere in this file. The error message will point to the end of the file, but you must find the opening parenthesis.';
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ $lang->error_help['baseobject'] = 'Object → BaseObject 변환이 필요한 서
|
|||
$lang->error_help['undef_constant'] = '문자열을 따옴표로 감싸지 않아서 발생하는 오류입니다. 오래된 자료에서 종종 사용하던 문법이나 최근 PHP에서는 허용되지 않으니, 에러 메시지에 포함된 파일명과 줄 번호를 참고하여 수정하세요.';
|
||||
$lang->error_help['undef_object'] = '객체를 먼저 선언하지 않고 속성을 추가하려 하고 있습니다. 오래된 자료에서 종종 사용하던 코딩 방식이나 최근 PHP에서는 허용되지 않으니, 에러 메시지에 포함된 파일명과 줄 번호를 참고하여 수정하세요.';
|
||||
$lang->error_help['not_array'] = '배열이 아닌 변수에 배열 함수를 사용하려 하고 있습니다. 오래된 자료에서 종종 사용하던 코딩 방식이나 최근 PHP에서는 허용되지 않으니, 에러 메시지에 포함된 파일명과 줄 번호를 참고하여 수정하세요.';
|
||||
$lang->error_help['unexpected_eof'] = '조건문이나 템플릿 문법 등에서 괄호의 짝이 맞지 않아 발생하는 오류입니다. 표시되는 위치는 파일의 맨 마지막 줄이지만, 괄호를 열었던 곳을 찾아 수정해야 합니다.';
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ class MessageView extends Message
|
|||
'/Undefined constant [\'"][^\'"]+?[\'"]/' => 'undef_constant',
|
||||
'/Attempt to assign property [\'"][^\'"]+?[\'"] on null/' => 'undef_object',
|
||||
'/Argument #\d+ \(\$\w+\) must be of type (Countable\|)?array, \w+ given ?/' => 'not_array',
|
||||
'/Syntax error, unexpected end of file\b/i' => 'unexpected_eof',
|
||||
];
|
||||
|
||||
foreach ($regexp_list as $regexp => $key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue