node.inc give error if locale not enabled

seworthi - July 20, 2009 - 15:08
Project:Content Management Filter
Version:6.x-1.7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

If you install this version without "locale" on, you will get an error message about node.inc, line 27 ("locale_language_list" function not defined). I think this is due to locale not enabled and line 27 does not check if locale is on before calling the function. Below if my fix (wrapped the call around a if check statement.

if (module_exists('locale')) {
$lang_codes = array('' => t('Neutral')) + locale_language_list('name');
}

#1

seworthi - July 20, 2009 - 15:08
Priority:normal» critical

#2

NancyDru - July 20, 2009 - 23:47
Status:active» fixed

Your fix was close, but not quite there. Thanks.

#3

chadd - July 21, 2009 - 15:58
Status:fixed» active

i just downloaded and upgraded to 1.7 and i'm getting this same error:

Fatal error: Call to undefined function locale_language_list() in node.inc on line 27

how should i fix if the OP fix was "not quite there"?

#4

NancyDru - July 21, 2009 - 16:23
Status:active» fixed

By downloading the -dev version, where all fixes that are since the last release are found.

#5

System Message - August 4, 2009 - 16:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.