Cannot use 'Object as class name as it is reserved Cake 2.2.x

前端 未结 1 1634
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-20 06:46

I\'m having an issue trying to set up a testing copy of a site we have running, I have the files and applications installed under a Mint VM and when I point apache at the di

相关标签:
1条回答
  • 2020-12-20 07:13

    The latter error is caused by the problem that causes former error, and the former error should be rather self-explantory, the name Object is reserved and cannot be used as class name anymore.

    Object has become a hard-reserved name in PHP 7.2, after being soft-reserved as of PHP 7.0. For proper PHP 7.2 compatibility, upgrade your CakePHP dependency to at least the latest 2.10.x release.

    If you are using the built-in encryption, you'll also have to either switch to OpenSSL (see the Security.useOpenSsl configuration option), or if the encryption that your app is using isn't compatible, install Mcrypt via PECL, or use a polyfill like phpseclib/mcrypt_compat.

    If you cannot upgrade CakePHP at this moment, then you'll have to downgrade your PHP installation to 7.1.x or earlier.

    See also

    • https://github.com/cakephp/cakephp/issues/11346
    • Cookbook > Core Libraries > Utilities > Security
    • Cookbook > Appendices > Migration Guides
    • PHP Manual > Appendices > Migrating from PHP 7.1.x to PHP 7.2.x > Backward incompatible changes > object for class names
    • PHP Manual > Appendices > Migrating from PHP 7.1.x to PHP 7.2.x > Other changes > Moving MCrypt to PECL
    0 讨论(0)
提交回复
热议问题