Commit 2f6ab5c6 authored by jcnventura's avatar jcnventura

Check if language_negotiation_get_any() exists before using it.

parent 955820ad
......@@ -142,7 +142,7 @@ function _print_pdf_file_access_images($html) {
global $base_url, $language;
$print_pdf_images_via_file = variable_get('print_pdf_images_via_file', PRINT_PDF_IMAGES_VIA_FILE_DEFAULT);
$lang = language_negotiation_get_any('locale-url') ? $language->language : '';
$lang = (function_exists('language_negotiation_get_any') && language_negotiation_get_any('locale-url')) ? $language->language : '';
// Always convert private to local paths
$pattern = "!(<img\s[^>]*?src\s*?=\s*?['\"]?)${base_url}/(?:(?:index.php)?\?q=)?(?:${lang}/)?system/files/([^>]*?>)!is";
......
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