moodlehq / moodle-local_codechecker

A Moodle local plugin providing a simple web UI to run the MoodleCS coding style checks with PHP_CodeSniffer.
63 stars 72 forks source link

Notice: Undefined offset: 0 in /local/codechecker/locallib.php on line 197 #198

Closed michael-milette closed 2 years ago

michael-milette commented 2 years ago

With debugging set to DEVELOPER mode, I get the following error messages when the source code file is empty:

Notice: Undefined offset: 0 in /local/codechecker/locallib.php on line 197

Line 197 is: https://github.com/moodlehq/moodle-local_codechecker/blob/00fb097ca836f56832be8067315aa8340bebf6d6/locallib.php#L197

CodeChecker does report the issue correctly but it should be able to handle the issue without reporting the above-mentioned notice.

image

Let me know if you have any questions.

Best regards,

Michael Milette

stronk7 commented 2 years ago

Closing. Fixed by #199

It's fun the notice was in line 197, this issue is 198 and the pull request 199, lol.

michael-milette commented 2 years ago

It was meant to be!

michael-milette commented 2 years ago

Thank you!