Php 如何修复LdapAuthenticate::getUser()应兼容。。。错误?

Php 如何修复LdapAuthenticate::getUser()应兼容。。。错误?,php,cakephp,authentication,ldap,Php,Cakephp,Authentication,Ldap,我试图实现CakePHP Ldap身份验证,但出现以下错误: Strict(2048):LdapAuthenticate::getUser()的声明应该是 与BaseAuthenticate::getUser兼容(CakeRequest$请求) [APP\Plugin\Idbroker\Controller\Component\Auth\ldapaauthenticate.php, 第5行] 错误的上下文是: App::uses('BaseAuthenticate', 'Controller/C

我试图实现CakePHP Ldap身份验证,但出现以下错误:

Strict(2048):LdapAuthenticate::getUser()的声明应该是 与BaseAuthenticate::getUser兼容(CakeRequest$请求) [APP\Plugin\Idbroker\Controller\Component\Auth\ldapaauthenticate.php, 第5行]

错误的上下文是:

App::uses('BaseAuthenticate', 'Controller/Component/Auth');

class LdapAuthenticate extends BaseAuthenticate {
$className = 'LdapAuthenticate'
$parts = array(
    (int) 0 => 'Idbroker',
    (int) 1 => 'Controller/Component/Auth'
)
$plugin = 'Idbroker'
$package = 'Controller/Component/Auth'
$file = ...Plugin\Idbroker\Controller\Component\Auth\LdapAuthenticate.php'
$paths = array(
    (int) 0 => ...Plugin\Idbroker\Controller\Component\Auth\',
    (int) 1 => ...Plugin\Idbroker\Lib\Controller/Component/Auth\',
    (int) 2 => ...Plugin\Idbroker\Controller/Component/Auth\'
)
$pluginPath = 'C:\csvn\www\KMDEV\app\Plugin\Idbroker\'
$normalizedClassName = 'LdapAuthenticate'
$path = '...Plugin\Idbroker\Controller\Component\Auth\'
include '...Plugin\Idbroker\Controller\Component\Auth\LdapAuthenticate.php line 5
App::load() - CORE\Cake\Core\App.php, line 561
spl_autoload_call - [internal], line ??
class_exists - [internal], line ??
我可以看到
ldapaauthenticate::getUser()
BaseAuthenticate::getUser(CakeRequest$request)
但我对PHP和CakePHP太陌生,不知道修复此问题的最佳方法。 中的步骤似乎很简单。 我唯一不同的地方是在App/Config/database.php中,我更改了内容(主机、端口等)以匹配我的web服务器;在App/Config/ldap.php中,我删除了除以下内容以外的所有内容:

<?php
$config['LDAP']['Db']['Config'] = 'ldap';
$config['LDAP']['User']['Identifier'] = 'samAccountName';

这是一个php严格警告。更新插件代码的方法签名以匹配它从核心继承的方法签名,消息将消失

您也可以这样做,但不建议这样做。严格警告的存在是有原因的。因此,每当您看到这样的警告时,请更新代码,并且您的操作已完成。它们也很容易修复