[eluser]Flipside Tech[/eluser]
Trying to use the pagination class for the first time and I received a PHP error.
Fatal error: Call to a member function segment() on a non-object in /webroot/_codeigniter/libraries/Pagination.php on line 136
Code:
Code:
$this->load->library('pagination');
$this->pagination->initialize(array(
'base_url' => base_url().'featured',
'uri_segment' => 2,
'total_rows' => (int)$this->caption_model->getTotalCount(),
'per_page' => RECORDS_PER_PAGE
));
print_r(array(
'base_url' => base_url().'featured',
'uri_segment' => 2,
'total_rows' => (int)$this->caption_model->getTotalCount(),
'per_page' => RECORDS_PER_PAGE
));
echo $this->pagination->create_links();
Output:
Code:
Array (
[base_url] => http://www.domain.com/featured
[uri_segment] => 2
[total_rows] => 19
[per_page] => 15
)
Fatal error: Call to a member function segment() on a non-object in /webroot/_codeigniter/libraries/Pagination.php on line 135
What up? Any ideas?