line 31 of /shared/html/sites/all/modules/views_datasource/views_plugin_style_xml.inc

Comments

mikeytown2’s picture

Status: Active » Needs review

$options['author'] = array('default' => isset($user->name) ? $user->name : '', 'translatable' => FALSE);

Notice: Undefined variable: content_type in include() (line 21 of sites/all/modules/views_datasource/theme/views-views-xml-style-raw.tpl.php).

$content_type = isset($content_type) ? $content_type : 'text/xml';

Notice: Undefined property: view::$override_path in include() (line 14 of sites/all/modules/views_datasource/theme/views-views-xml-style-raw.tpl.php).

if (!empty($view->override_path)) {

ergonlogic’s picture

So far, I've only seen these two errors, referenced in #1:

Notice: Undefined variable: content_type in include() (line 21 of sites/all/modules/views_datasource/theme/views-views-xml-style-raw.tpl.php)
Notice: Undefined property: view::$override_path in include() (line 14 of sites/all/modules/views_datasource/theme/views-views-xml-style-raw.tpl.php).

The attached patch fixes them both.

rooby’s picture

Issue summary: View changes
Status: Needs review » Needs work
-	if ($view->override_path) {       // inside live preview
+	if (isset($view->override_path)) {       // inside live preview

These 2 lines aren't equivalent.

Unless you can guarantee that if $view->override_path is either not set or not empty then this would be better:

if (isset($view->override_path) && $view->override_path) {

The patch also doesn't fix the error in the issue title relating to $user->name.

zeip’s picture

Status: Needs work » Closed (outdated)

Drupal 6 has been EOL for some years, closing all D6 issues. The changes have already been made to the D7 version.