Ticket #223 (closed Bug: fixed)
Pagination has the __toString() bug on PHP 5.1.6
| Reported by: | dynom | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 2.1 |
| Component: | Core | Version: | SVN HEAD |
| Keywords: | PHP5.1 toString | Cc: |
Description
in Pagination::create_links() there is a toString() call in View();
public function create_links($style = NULL) {
$style = (isset($style)) ? $style : $this->style; return (string)new View(trim($this->directory, '/').'/'.$style, get_object_vars($this)) ;
}
This way of returning fails the toString() call on PHP 5.1.6. To fix this, call View()->render(). e.g.:
public function create_links($style = NULL) {
$style = (isset($style)) ? $style : $this->style; $view = new View(trim($this->directory, '/').'/'.$style, get_object_vars($this));
return (string) $view->render();
}
Change History
Note: See
TracTickets for help on using
tickets.
