Fatal error: Call to undefined function drupal_get_path() in /***my-drupal5-site***/sites/all/modules/teaserthumbnail/teaserthumbnail.module on line 141

This occures only once, when I check my site with a new browser that never called that page before.
I could reproduce the bug using ie netrenderer: http://ipinfo.info/netrenderer

Adding this function solved the problem:

if (!function_exists("drupal_get_path")) {
	function drupal_get_path($type, $name) {
	  return dirname(drupal_get_filename($type, $name));
	}
}

Btw i found many issues about this problem at many contributed modules. Is this about drupal core?

Comments

hunvreus’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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