Commit 4e06f710 authored by Konstantin Komelin's avatar Konstantin Komelin
Browse files

by konstantin.komelin: Added additional check for libraries_get_path function existence.

parent 04d95934
......@@ -34,8 +34,11 @@ function _simplhtmldom_get_library_path() {
$file = 'simple_html_dom.php';
$library = 'simplehtmldom';
// Support libraries module.
if (module_exists('libraries') && file_exists(libraries_get_path($library) . "/$file")) {
return libraries_get_path($library) . "/$file";
if (module_exists('libraries') && function_exists('libraries_get_path')) {
$path = libraries_get_path($library) . "/$file";
if (file_exists($path)) {
return $path;
}
}
else {
$paths = array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment