If an implementation of geocode_handler_info doesn't specify a file path, don't try to require_once the file, which leads to errors. It should be possible for a module to either do the autoloading of classes itself, or just have the class in the .module file.

Comments

robertdouglass’s picture

StatusFileSize
new863 bytes

Oops, missed a )

robertdouglass’s picture

StatusFileSize
new822 bytes

Like this version better.

allie micka’s picture

Thanks robertDouglass. Is it possible to reproduce an example of the error-throwing?

robertdouglass’s picture

I ran into it as a problem in the process of #693976: Integrate with the geocode module, but not with the code that is listed there. I wanted to add my own class and because I'm lazy I wanted the class to be in the .module file, which gets loaded anyway. So I didn't provide file or file path information, but the code in geocode tries to require_once no matter what. My point is only that it is an odd assumption or requirement to make that you HAVE to load a file to get the new class.

allie micka’s picture

Status: Needs review » Fixed

Ah, fair enough.

Committed - thanks a lot, Robert!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.