My PHPStorm code analysis reported that there is an undefined variable used in the function views_content_views_content_type_content_type() in the file ctools/views_content/plugins/content_types/views.inc.
As you see below, there is no $name variable defined in the function, so the $view variable will always be empty, so this function will always return without doing anything.
/**
* Return a single content type.
*/
function views_content_views_content_type_content_type($subtype, $plugin) {
$view = views_get_view($name);
if (empty($view)) {
return;
}
return _views_content_views_content_type($view);
}
Comments
Comment #1
ey commentedComment #2
torgospizzaI noticed this too. It almost looks like it's an alias of _views_content_views_content_type(), which gets called in a few places, unlike this function which I don't see any references to (at least, currently).
Comment #3
maximpodorov commented$subtype must be used instead of $name.
Comment #5
japerryThis is an old deprecated function from 2009 and drupal 6. It is not used anywhere (nor is it used in views), and as the reporter said -- this function will never work.
Removed the code entirely. Yay cleanup!