0

您好,我在我的网站 www.csvc.nl 收到以下消息

致命错误:在 /var/www/vhosts/csvc.nl/httpdocs/cms/updates/concrete5.6.0/concrete/core/models/permission/response.php 中的非对象上调用成员函数 getPermissionKeyByHandle()第 53 行

PHP代码是:

    <?php 
    defined('C5_EXECUTE') or die("Access Denied.");
    class Concrete5_Model_PermissionResponse {

protected $object;
protected $allowedPermissions = array();
protected $customClassObjects = array();
protected $category;
static $cache = array();

public function setPermissionObject($object) { 
    $this->object = $object;
}
public function getPermissionObject() {
    return $this->object;
}
public function setPermissionCategoryObject($category) {
    $this->category = $category;
}

public function testForErrors() { }

public static function getResponse($object) {
    $r = PermissionCache::getResponse($object);
    if (is_object($r)) {
        return $r;
    }

    $category = PermissionKeyCategory::getByHandle(Loader::helper('text')-        >uncamelcase(get_class($object)));
    if (!is_object($category) && $object instanceof Page) {
        $category = PermissionKeyCategory::getByHandle('page');
    }
    $txt = Loader::helper('text');
    $c1 = get_class($object) . 'PermissionResponse';
    if (!class_exists($c1)) {
        $c1 = 'PagePermissionResponse';
    }
    $pr = new $c1();
    $pr->setPermissionObject($object);
    $pr->setPermissionCategoryObject($category);

    PermissionCache::addResponse($object, $pr);

    return $pr;
}

public function validate($permission, $args = array()) {
    $u = new User();
    if ($u->isSuperUser()) {
        return true;
    }

    $pk = $this->category->getPermissionKeyByHandle($permission);
    if (!$pk) {
        print t('Unable to get permission key for %s', $permission);
        exit;
    }
    $pk->setPermissionObject($this->object);
    return call_user_func_array(array($pk, 'validate'), $args);
}

public function __call($f, $a) {
    $permission = substr($f, 3);
    $permission = Loader::helper('text')->uncamelcase($permission);
    return $this->validate($permission, $a);
}

}

有谁知道问题是什么?

4

1 回答 1

1

我在不完整的 5.6.0 升级中遇到了类似的问题。

Concrete 5 有核心升级故障排除指南

对我来说,我只需要在我的网站上执行此操作:http ://example.com/index.php/tools/required/upgrade并使用升级按钮。

仅供参考,这将条目添加到 PermissionKeyCategories 和其他表(存在,但为空)。

于 2012-09-01T16:42:35.373 回答