editorconfig.el: Fix bug#78097
When there is no `.editorconfig` variable, the
`file-name-directory` call can signal an error, but that can
happen only if `editorconfig-get-local-variables-functions`
added entries "out of thin air". So just skip running that hook
to avoid this corner case.
* lisp/editorconfig.el (editorconfig--get-dir-local-variables):
Don't run `editorconfig-get-local-variables-functions` when we found no
EditorConfig settings.
(cherry picked from commit
28a8bd6061d99c71ca2ac17868dfc8cf36a1c728)