Commit bd4fe7c0 authored by yched's avatar yched

#894880 by yched: fix notices in check_plain() when rendering empty 'plain text' values

parent b1d18e5b
......@@ -7,6 +7,7 @@ CCK 6.x-2.x
- #887742 by yched: fix notices in _content_get_formatter() in some Views
- #736440 by yched, dhthwy: fix memory leaks on long running migration scripts (e.g. migrate.module)
- #705512 by cha0s, roderick: 'add more' button - fix PHP5.3 compatibility
- #894880 by yched: fix notices in check_plain() when rendering empty 'plain text' values
CCK 6.x-2.8
===========
......
......@@ -322,7 +322,7 @@ function content_add_more_js($type_name_url, $field_name) {
$form_element = content_field_form($form, $form_state, $field);
// Let other modules alter it.
// We pass an empty array as hook_form_alter's usual 'form_state' parameter,
// instead of $form_atate (for reasons we may never remember).
// instead of $form_state (for reasons we may never remember).
// However, this argument is still expected to be passed by-reference
// (and PHP5.3 will throw an error if it isn't.) This leads to:
$data = &$form_element;
......
......@@ -171,7 +171,7 @@ function text_field($op, &$node, $field, &$items, $teaser, $page) {
$text = isset($item['value']) ? check_markup($item['value'], $item['format'], $check) : '';
}
else {
$text = check_plain($item['value']);
$text = isset($item['value']) ? check_plain($item['value']) : '';
}
$items[$delta]['safe'] = $text;
}
......@@ -483,4 +483,4 @@ function theme_text_textfield($element) {
function theme_text_textarea($element) {
return $element['#children'];
}
\ No newline at end of file
}
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