mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing errors generated by ajaxProvider class not being loaded when checking for method implementation.
This commit is contained in:
parent
a43356c772
commit
4d7fc24850
1 changed files with 5 additions and 2 deletions
|
@ -88,10 +88,13 @@ class PaginatorHelper extends AppHelper {
|
||||||
$ajaxProvider = isset($config['ajax']) ? $config['ajax'] : 'Js';
|
$ajaxProvider = isset($config['ajax']) ? $config['ajax'] : 'Js';
|
||||||
$this->helpers[] = $ajaxProvider;
|
$this->helpers[] = $ajaxProvider;
|
||||||
$this->_ajaxHelperClass = $ajaxProvider;
|
$this->_ajaxHelperClass = $ajaxProvider;
|
||||||
if (!method_exists($ajaxProvider . 'Helper', 'link')) {
|
|
||||||
|
App::import('Helper', $ajaxProvider);
|
||||||
|
$classname = $ajaxProvider . 'Helper';
|
||||||
|
if (!method_exists($classname, 'link')) {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true),
|
__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true),
|
||||||
$ajaxProvider . 'Helper'
|
$classname
|
||||||
);
|
);
|
||||||
trigger_error($message, E_USER_WARNING);
|
trigger_error($message, E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue