Skip to content
Permalink
Browse files

Fixing errors generated by ajaxProvider class not being loaded when c…

…hecking for method implementation.
  • Loading branch information...
markstory committed Aug 31, 2009
1 parent a43356c commit 4d7fc24850021d64f0906e84fbf30cbc091ad1db
Showing with 5 additions and 2 deletions.
  1. +5 −2 cake/libs/view/helpers/paginator.php
@@ -88,10 +88,13 @@ function __construct($config = array()) {
$ajaxProvider = isset($config['ajax']) ? $config['ajax'] : 'Js';
$this->helpers[] = $ajaxProvider;
$this->_ajaxHelperClass = $ajaxProvider;
if (!method_exists($ajaxProvider . 'Helper', 'link')) {
App::import('Helper', $ajaxProvider);
$classname = $ajaxProvider . 'Helper';
if (!method_exists($classname, 'link')) {
$message = sprintf(
__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true),
$ajaxProvider . 'Helper'
$classname
);
trigger_error($message, E_USER_WARNING);
}

0 comments on commit 4d7fc24

Please sign in to comment.
You can’t perform that action at this time.