When using views to display ads AND setting "Use pager: Display all items"
then I get error message.

Notice: Undefined property: views_plugin_query_default::$limit in template_preprocess_views_simpleads() (line 148 of /.../sites/all/modules/simpleads/includes/simpleads.theme.inc).

Suggest to replace

$limit = check_plain($view->query->limit);

with this construct

$limit =
property_exists( $view->query, "limit" )
? check_plain($view->query->limit)
: 1000;

Comments

minnur’s picture

Status: Active » Needs review
rajasekar33’s picture

Status: Needs review » Patch (to be ported)

Don't fix the limit manually:
- $limit = check_plain($view->query->limit);

+ $limit = (property_exists($view->query,"limit"))?check_plain($view->query->limit):count($rows);

minnur’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (won't fix)