Problem when navigating to a second page

Hi,

Whitin Joomla i have a component where i can create contracts and task for customers. Here i can also create pdf reports. Now when i go to reports i see 5 items (which is the limit for a page) but i have 6. When i navigate to the second page i get the following error message:

Warning: array_splice() expects parameter 1 to be array, null given in /pad/…/contractstk.php on line 32

The output of the file is:

24 // Invoke the parent getItems method to get the main list
25 $query=‘select * from #__taskmanage_task where contract_id=’.JRequest::getVar(‘cId’);;
26 $this->_db->setQuery($query);
27 $result = $this->_db->loadObjectList();
28
29 $limitstart= JRequest::getUInt(‘limitstart’, 0);
30 $limit= JRequest::getUInt(‘limit’, 10);
31 if ($limit > 0) {
32 $Alldata = array_splice($result, $limitstart, $limit);
33 } else {
34 $Alldata = $result;
35 }
36 return $Alldata;
37 }

What went wrong

Thanks a lot!

Richard

You’d be best to ask this on a joomla forum. There are many things in that script that are joomla specific and most people here probably won’t know what the output value is of those things without looking through a lot of your code.

Sponsor our Newsletter | Privacy Policy | Terms of Service