Closed (won't fix)
Project:
SimpleAds
Version:
7.x-1.8
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2012 at 09:18 UTC
Updated:
9 Jun 2023 at 16:13 UTC
Jump to comment: Most recent
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
Comment #1
minnur commentedComment #2
rajasekar33 commentedDon't fix the limit manually:
- $limit = check_plain($view->query->limit);
+ $limit = (property_exists($view->query,"limit"))?check_plain($view->query->limit):count($rows);
Comment #3
minnur commented